diff --git a/fio.spec b/fio.spec index de0050c7070cf12f03f71e9c72d909a24b88b9b2..d04272a8dd01128974e45339409c3cbe24a7d954 100644 --- a/fio.spec +++ b/fio.spec @@ -1,6 +1,6 @@ Name: fio Version: 3.7 -Release: 4 +Release: 5 Summary: Versatile IO workload generator License: GPLv2 URL: http://git.kernel.dk/?p=fio.git;a=summary @@ -10,7 +10,7 @@ BuildRequires: libaio-devel zlib-devel librbd1-devel numactl-devel librdmacm-de %ifarch x86_64 BuildRequires: libpmem-devel libpmemblk-devel %endif - +Patch0000: fix-glibc-error.patch %description fio is a tool used to spawn many threads or processes that perform a specific type @@ -45,6 +45,9 @@ export EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" %{_mandir}/man1/* %changelog +* Thu Jul 23 2020 wutao - 3.7-5 +- fix build error because of updating glibc + * Sat Mar 21 2020 huzunhao - 3.7-4 - Type: NA - ID: NA diff --git a/fix-glibc-error.patch b/fix-glibc-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..eb9c66317130d535bf5f8adce3f05662c1ef61c2 --- /dev/null +++ b/fix-glibc-error.patch @@ -0,0 +1,44 @@ +diff --git a/fio-3.7/configure b/fio-3.7-edit/configure +index 9bdc7a1..ed345ba 100755 +--- a/configure ++++ b/configure +@@ -2462,3 +2462,22 @@ SRCDIR:=`dirname $0` + include \$(SRCDIR)/Makefile + EOF + fi ++ ++########################################## ++# check for gettid() ++gettid="no" ++cat > $TMPC << EOF ++#include ++int main(int argc, char **argv) ++{ ++ return gettid(); ++} ++EOF ++if compile_prog "" "" "gettid"; then ++ gettid="yes" ++fi ++print_config "gettid" "$gettid" ++ ++if test "$gettid" = "yes"; then ++ output_sym "CONFIG_HAVE_GETTID" ++fi +diff --git a/fio-3.7/os/os-linux.h b/fio-3.7-edit/os/os-linux.h +index a550bba..90d8929 100644 +--- a/os/os-linux.h ++++ b/os/os-linux.h +@@ -126,10 +126,12 @@ static inline int ioprio_set(int which, int who, int ioprio_class, int ioprio) + return syscall(__NR_ioprio_set, which, who, ioprio); + } + ++#ifndef CONFIG_HAVE_GETTID + static inline int gettid(void) + { + return syscall(__NR_gettid); + } ++#endif + + #define SPLICE_DEF_SIZE (64*1024) +