From ba4026b09d83acf56c040b6933eac7916c27e728 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 1 Nov 2021 11:38:02 -0300 Subject: [PATCH] Revert "perf bench futex: Add support for 32-bit systems with 64-bit time_t" This reverts commit c1ff12dac4657e0134c972978479b97f652711a2. This commit makes the build break on ubuntu 20.04 and other older systems and it as well has identation problems, lets revert it till we get these problems fixed. Test results: 1 78.36 almalinux:8 : Ok gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1) , clang version 11.0.0 (Red Hat 11.0.0-1.module_el8.4.0+2107+39fed697) 2 8.40 alpine:3.4 : FAIL gcc version 5.3.0 (Alpine 5.3.0) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 3 8.89 alpine:3.5 : FAIL gcc version 6.2.1 20160822 (Alpine 6.2.1) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 4 8.59 alpine:3.6 : FAIL gcc version 6.3.0 (Alpine 6.3.0) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 5 9.01 alpine:3.7 : FAIL gcc version 6.4.0 (Alpine 6.4.0) In file included from bench/futex-wake.c:25:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 6 8.70 alpine:3.8 : FAIL gcc version 6.4.0 (Alpine 6.4.0) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 7 9.70 alpine:3.9 : FAIL gcc version 8.3.0 (Alpine 8.3.0) In file included from bench/futex-wake.c:25: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake-parallel.c:31: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-hash.c:29: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 8 9.40 alpine:3.10 : FAIL gcc version 8.3.0 (Alpine 8.3.0) In file included from bench/futex-hash.c:29: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 9 9.81 alpine:3.11 : FAIL gcc version 9.3.0 (Alpine 9.3.0) In file included from bench/futex-hash.c:29: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory 16 | #include | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory 16 | #include | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 10 10.32 alpine:3.12 : FAIL gcc version 9.3.0 (Alpine 9.3.0) bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' 64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) | ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known 68 | struct __kernel_old_timespec ts32; | ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 11 99.82 alpine:3.13 : Ok gcc (Alpine 10.2.1_pre1) 10.2.1 20201203 , Alpine clang version 10.0.1 12 87.39 alpine:3.14 : Ok gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424 , Alpine clang version 11.1.0 13 86.89 alpine:edge : Ok gcc (Alpine 10.3.1_git20210921) 10.3.1 20210921 , Alpine clang version 12.0.1 14 7.30 alt:p8 : FAIL gcc version 5.3.1 20151207 (ALT p8 5.3.1-alt3.M80P.1) (GCC) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. make[3]: *** [bench] Error 2 15 63.92 alt:p9 : Ok x86_64-alt-linux-gcc (GCC) 8.4.1 20200305 (ALT p9 8.4.1-alt0.p9.1) , clang version 10.0.0 16 61.42 alt:sisyphus : Ok x86_64-alt-linux-gcc (GCC) 11.2.1 20210911 (ALT Sisyphus 11.2.1-alt1) , ALT Linux Team clang version 12.0.1 17 8.30 amazonlinux:1 : FAIL gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [bench] Error 2 18 8.71 amazonlinux:2 : FAIL gcc version 7.3.1 20180712 (Red Hat 7.3.1-13) (GCC) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [bench] Error 2 19 79.56 centos:8 : Ok gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1) , clang version 11.0.0 (Red Hat 11.0.0-1.module_el8.4.0+587+5187cac0) 20 82.28 centos:stream : Ok gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-3) , clang version 12.0.1 (Red Hat 12.0.1-2.module_el8.6.0+937+1cafe22c) 21 55.24 clearlinux:latest : Ok gcc (Clear Linux OS for Intel Architecture) 11.2.1 20211020 releases/gcc-11.2.0-375-g40b209e340 , clang version 11.1.0 22 7.41 debian:9 : FAIL gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 23 7.90 debian:10 : FAIL gcc version 8.3.0 (Debian 8.3.0-6) In file included from bench/futex-hash.c:29: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 24 60.32 debian:11 : Ok gcc (Debian 10.2.1-6) 10.2.1 20210110 , Debian clang version 11.0.1-2 25 59.42 debian:experimental : Ok gcc (Debian 11.2.0-10) 11.2.0 , Debian clang version 11.1.0-4 26 23.76 debian:experimental-x-arm64 : Ok aarch64-linux-gnu-gcc (Debian 11.2.0-9) 11.2.0 27 19.25 debian:experimental-x-mips : Ok mips-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110 28 21.25 debian:experimental-x-mips64 : Ok mips64-linux-gnuabi64-gcc (Debian 10.2.1-6) 10.2.1 20210110 29 21.88 debian:experimental-x-mipsel : Ok mipsel-linux-gnu-gcc (Debian 11.2.0-9) 11.2.0 30 8.20 fedora:22 : FAIL gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 31 8.20 fedora:23 : FAIL gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 32 8.59 fedora:24 : FAIL gcc version 6.3.1 20161221 (Red Hat 6.3.1-1) (GCC) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 33 6.60 fedora:24-x-ARC-uClibc : FAIL gcc version 7.1.1 20170710 (ARCompact ISA Linux uClibc toolchain 2017.09-rc2) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 34 8.59 fedora:25 : FAIL gcc version 6.4.1 20170727 (Red Hat 6.4.1-1) (GCC) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory #include ^ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 35 14.61 fedora:26 : FAIL gcc version 7.3.1 20180130 (Red Hat 7.3.1-2) (GCC) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 36 8.79 fedora:27 : FAIL gcc version 7.3.1 20180712 (Red Hat 7.3.1-6) (GCC) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 37 15.12 fedora:28 : FAIL gcc version 8.3.1 20190223 (Red Hat 8.3.1-2) (GCC) In file included from bench/futex-wake.c:25: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-hash.c:29: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake-parallel.c:31: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 38 9.60 fedora:29 : FAIL gcc version 8.3.1 20190223 (Red Hat 8.3.1-2) (GCC) bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known struct __kernel_old_timespec ts32; ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 39 101.90 fedora:30 : Ok gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2) , clang version 8.0.0 (Fedora 8.0.0-3.fc30) 40 99.30 fedora:31 : Ok gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2) , clang version 9.0.1 (Fedora 9.0.1-4.fc31) 41 82.46 fedora:32 : Ok gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1) , clang version 10.0.1 (Fedora 10.0.1-3.fc32) 42 81.32 fedora:33 : Ok gcc (GCC) 10.3.1 20210422 (Red Hat 10.3.1-1) , clang version 11.0.0 (Fedora 11.0.0-3.fc33) 43 84.07 fedora:34 : Ok gcc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1) , clang version 12.0.1 (Fedora 12.0.1-1.fc34) 44 7.09 fedora:34-x-ARC-glibc : FAIL gcc version 8.3.1 20190225 (ARC HS GNU/Linux glibc toolchain 2019.03-rc1) In file included from bench/futex-hash.c:29: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake-parallel.c:31: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 45 6.29 fedora:34-x-ARC-uClibc : FAIL gcc version 8.3.1 20190225 (ARCv2 ISA Linux uClibc toolchain 2019.03-rc1) In file included from bench/futex-hash.c:29: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 46 74.74 fedora:35 : Ok gcc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1) , clang version 13.0.0 (Fedora 13.0.0~rc1-1.fc35) 47 73.13 fedora:rawhide : Ok gcc (GCC) 11.2.1 20211019 (Red Hat 11.2.1-6) , clang version 13.0.0 (Fedora 13.0.0-4.fc36) 48 28.17 gentoo-stage3:latest : Ok gcc (Gentoo 11.2.0 p1) 11.2.0 49 9.10 mageia:6 : FAIL gcc version 5.5.0 (Mageia 5.5.0-1.mga6) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-wake-parallel.c:31:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 50 38.60 mageia:7 : FAIL clang version 8.0.0 (Mageia 8.0.0-1.mga7) yychar = yylex (&yylval, &yylloc, scanner); ^ #define yylex parse_events_lex ^ 1 error generated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: util] Error 2 51 6.18 openmandriva:cooker : FAIL gcc version 11.2.0 20210728 (OpenMandriva) (GCC) In file included from builtin-bench.c:22: bench/bench.h:66:19: error: conflicting types for 'pthread_attr_setaffinity_np'; have 'int(pthread_attr_t *, size_t, cpu_set_t *)' {aka 'int(pthread_attr_t *, long unsigned int, cpu_set_t *)'} 66 | static inline int pthread_attr_setaffinity_np(pthread_attr_t *attr __maybe_unused, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from bench/bench.h:64, from builtin-bench.c:22: /usr/include/pthread.h:394:12: note: previous declaration of 'pthread_attr_setaffinity_np' with type 'int(pthread_attr_t *, size_t, const cpu_set_t *)' {aka 'int(pthread_attr_t *, long unsigned int, const cpu_set_t *)'} 394 | extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ file: Compiled magic version [540] does not match with shared library magic version [539] ld: warning: -r and --gc-sections may not be used together, disabling --gc-sections ld: warning: -r and --icf may not be used together, disabling --icf ld: warning: -r and --gc-sections may not be used together, disabling --gc-sections ld: warning: -r and --icf may not be used together, disabling --icf file: Compiled magic version [540] does not match with shared library magic version [539] file: Compiled magic version [540] does not match with shared library magic version [539] ld: warning: -r and --gc-sections may not be used together, disabling --gc-sections ld: warning: -r and --icf may not be used together, disabling --icf 52 12.51 opensuse:15.0 : FAIL gcc version 7.4.1 20190905 [gcc-7-branch revision 275407] (SUSE Linux) Makefile.config:999: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev update-alternatives: error: no alternatives for java update-alternatives: error: no alternatives for java Makefile.config:1043: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... libbfd: [ OFF ] ... libbfd-buildid: [ OFF ] ... libcap: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] ... disassembler-four-args: [ on ] PERF_VERSION = 5.15.g875eaa399042 GEN perf-archive GEN perf-with-kcore GEN perf-iostat -- In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake-parallel.c:31:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-requeue.c:26:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 53 12.41 opensuse:15.1 : FAIL gcc version 7.5.0 (SUSE Linux) Makefile.config:999: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev update-alternatives: error: no alternatives for java update-alternatives: error: no alternatives for java Makefile.config:1043: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... libbfd: [ OFF ] ... libbfd-buildid: [ OFF ] ... libcap: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] ... disassembler-four-args: [ on ] PERF_VERSION = 5.15.g875eaa399042 GEN perf-archive GEN perf-with-kcore GEN perf-iostat -- In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake-parallel.c:31:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-requeue.c:26:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 54 12.20 opensuse:15.2 : FAIL gcc version 7.5.0 (SUSE Linux) Makefile.config:999: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev update-alternatives: error: no alternatives for java update-alternatives: error: no alternatives for java Makefile.config:1043: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... libbfd: [ OFF ] ... libbfd-buildid: [ OFF ] ... libcap: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] ... disassembler-four-args: [ on ] PERF_VERSION = 5.15.g875eaa399042 GEN perf-archive GEN perf-with-kcore GEN perf-iostat -- bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known struct __kernel_old_timespec ts32; ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors In file included from bench/futex-wake.c:25:0: bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known struct __kernel_old_timespec ts32; ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors In file included from bench/futex-wake-parallel.c:31:0: bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known struct __kernel_old_timespec ts32; ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 55 12.30 opensuse:15.3 : FAIL gcc version 7.5.0 (SUSE Linux) Makefile.config:999: No libbabeltrace found, disables 'perf data' CTF format support, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev update-alternatives: error: no alternatives for java update-alternatives: error: no alternatives for java Makefile.config:1043: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel Auto-detecting system features: ... dwarf: [ on ] ... dwarf_getlocations: [ on ] ... glibc: [ on ] ... libbfd: [ OFF ] ... libbfd-buildid: [ OFF ] ... libcap: [ on ] ... libelf: [ on ] ... libnuma: [ on ] ... numa_num_possible_cpus: [ on ] ... libperl: [ on ] ... libpython: [ on ] ... libcrypto: [ on ] ... libunwind: [ on ] ... libdw-dwarf-unwind: [ on ] ... zlib: [ on ] ... lzma: [ on ] ... get_cpuid: [ on ] ... bpf: [ on ] ... libaio: [ on ] ... libzstd: [ on ] ... disassembler-four-args: [ on ] PERF_VERSION = 5.15.g875eaa399042 GEN perf-archive GEN perf-with-kcore GEN perf-iostat -- bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known struct __kernel_old_timespec ts32; ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] In file included from bench/futex-hash.c:29:0: bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known struct __kernel_old_timespec ts32; ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors cc1: all warnings being treated as errors In file included from bench/futex-wake-parallel.c:31:0: bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known struct __kernel_old_timespec ts32; ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 56 92.79 opensuse:tumbleweed : Ok gcc (SUSE Linux) 11.2.1 20210816 [revision 056e324ce46a7924b5cf10f61010cf9dd2ca10e9] , clang version 13.0.0 57 78.85 oraclelinux:8 : Ok gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1.0.4) , clang version 11.0.0 (Red Hat 11.0.0-1.0.1.module+el8.4.0+20046+39fed697) 58 78.47 rockylinux:8 : Ok gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1) , clang version 11.0.0 (Red Hat 11.0.0-1.module+el8.4.0+412+05cf643f) 59 8.32 ubuntu:16.04 : FAIL gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 60 7.19 ubuntu:16.04-x-arm : FAIL gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) In file included from bench/futex-wake.c:25:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 61 18.14 ubuntu:16.04-x-arm64 : FAIL gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 62 6.99 ubuntu:16.04-x-powerpc : FAIL gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 63 7.29 ubuntu:16.04-x-powerpc64 : FAIL gcc version 5.4.0 20160609 (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-wake-parallel.c:31:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-requeue.c:26:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-lock-pi.c:19:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 64 7.29 ubuntu:16.04-x-powerpc64el : FAIL gcc version 5.4.0 20160609 (Ubuntu/IBM 5.4.0-6ubuntu1~16.04.9) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 65 6.59 ubuntu:16.04-x-s390 : FAIL gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. In file included from bench/futex-wake-parallel.c:31:0: bench/futex.h:16:30: fatal error: linux/time_types.h: No such file or directory compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 66 9.00 ubuntu:18.04 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 67 7.49 ubuntu:18.04-x-arm : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 68 7.49 ubuntu:18.04-x-arm64 : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 69 6.09 ubuntu:18.04-x-m68k : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake-parallel.c:31:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 70 7.40 ubuntu:18.04-x-powerpc : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 71 8.00 ubuntu:18.04-x-powerpc64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 72 7.99 ubuntu:18.04-x-powerpc64el : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 73 6.89 ubuntu:18.04-x-riscv64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 74 6.69 ubuntu:18.04-x-s390 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 75 7.29 ubuntu:18.04-x-sh4 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 76 6.69 ubuntu:18.04-x-sparc64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) In file included from bench/futex-hash.c:29:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. In file included from bench/futex-wake.c:25:0: bench/futex.h:16:10: fatal error: linux/time_types.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. /git/perf-5.15.0/tools/build/Makefile.build:139: recipe for target 'bench' failed make[3]: *** [bench] Error 2 77 9.59 ubuntu:20.04 : FAIL gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' 64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) | ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known 68 | struct __kernel_old_timespec ts32; | ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors In file included from bench/futex-wake.c:25: bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' 64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) | ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known 68 | struct __kernel_old_timespec ts32; | ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors In file included from bench/futex-wake-parallel.c:31: bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' 64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) | ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known 68 | struct __kernel_old_timespec ts32; | ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 78 8.29 ubuntu:20.04-x-powerpc64el : FAIL gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1~20.04) bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' 64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) | ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known 68 | struct __kernel_old_timespec ts32; | ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors In file included from bench/futex-wake.c:25: bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' 64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) | ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known 68 | struct __kernel_old_timespec ts32; | ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] In file included from bench/futex-requeue.c:26: bench/futex.h: In function 'futex_syscall': bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' 64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) | ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known 68 | struct __kernel_old_timespec ts32; | ^~~~ In file included from bench/futex-wake-parallel.c:31: bench/futex.h: In function 'futex_syscall': bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] bench/futex.h:64:33: error: invalid application of 'sizeof' to incomplete type 'struct __kernel_old_timespec' 64 | if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) | ^~~~~~ bench/futex.h:68:32: error: storage size of 'ts32' isn't known 68 | struct __kernel_old_timespec ts32; | ^~~~ bench/futex.h:68:32: error: unused variable 'ts32' [-Werror=unused-variable] cc1: all warnings being treated as errors cc1: all warnings being treated as errors cc1: all warnings being treated as errors make[3]: *** [/git/perf-5.15.0/tools/build/Makefile.build:139: bench] Error 2 79 65.92 ubuntu:20.10 : Ok gcc (Ubuntu 10.3.0-1ubuntu1~20.10) 10.3.0 , Ubuntu clang version 11.0.0-2 80 65.91 ubuntu:21.04 : Ok gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0 , Ubuntu clang version 12.0.0-3ubuntu1~21.04.2 81 68.12 ubuntu:21.10 : Ok gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0 , Ubuntu clang version 13.0.0-2 Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/bench/futex.h | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) diff --git a/tools/perf/bench/futex.h b/tools/perf/bench/futex.h index 6a7dd86..ebdc2b0 100644 --- a/tools/perf/bench/futex.h +++ b/tools/perf/bench/futex.h @@ -8,12 +8,10 @@ #ifndef _FUTEX_H #define _FUTEX_H -#include #include #include #include #include -#include struct bench_futex_parameters { bool silent; @@ -30,7 +28,7 @@ struct bench_futex_parameters { }; /** - * futex_syscall() - __NR_futex syscall wrapper + * futex_syscall() - SYS_futex syscall wrapper * @uaddr: address of first futex * @op: futex op code * @val: typically expected value of uaddr, but varies by op @@ -51,49 +49,14 @@ static inline int futex_syscall(volatile u_int32_t *uaddr, int op, u_int32_t val, struct timespec *timeout, volatile u_int32_t *uaddr2, int val3, int opflags) { -#if defined(__NR_futex_time64) - if (sizeof(*timeout) != sizeof(struct __kernel_old_timespec)) { - int ret = syscall(__NR_futex_time64, uaddr, op | opflags, val, timeout, - uaddr2, val3); - if (ret == 0 || errno != ENOSYS) - return ret; - } -#endif - -#if defined(__NR_futex) - if (sizeof(*timeout) == sizeof(struct __kernel_old_timespec)) - return syscall(__NR_futex, uaddr, op | opflags, val, timeout, uaddr2, val3); - - if (timeout && timeout->tv_sec == (long)timeout->tv_sec) { - struct __kernel_old_timespec ts32; - - ts32.tv_sec = (__kernel_long_t) timeout->tv_sec; - ts32.tv_nsec = (__kernel_long_t) timeout->tv_nsec; - - return syscall(__NR_futex, uaddr, op | opflags, val, ts32, uaddr2, val3); - } else if (!timeout) { - return syscall(__NR_futex, uaddr, op | opflags, val, NULL, uaddr2, val3); - } -#endif - - errno = ENOSYS; - return -1; + return syscall(SYS_futex, uaddr, op | opflags, val, timeout, uaddr2, val3); } static inline int futex_syscall_nr_requeue(volatile u_int32_t *uaddr, int op, u_int32_t val, int nr_requeue, volatile u_int32_t *uaddr2, int val3, int opflags) { -#if defined(__NR_futex_time64) - int ret = syscall(__NR_futex_time64, uaddr, op | opflags, val, nr_requeue, - uaddr2, val3); - if (ret == 0 || errno != ENOSYS) - return ret; -#endif - -#if defined(__NR_futex) - return syscall(__NR_futex, uaddr, op | opflags, val, nr_requeue, uaddr2, val3); -#endif + return syscall(SYS_futex, uaddr, op | opflags, val, nr_requeue, uaddr2, val3); } /** -- 2.7.4