]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
tst-clone3: Use __NR_futex_time64 if we don't have __NR_futex
authorAlistair Francis <alistair.francis@wdc.com>
Mon, 11 Nov 2019 23:07:19 +0000 (15:07 -0800)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 14 Feb 2020 22:40:34 +0000 (14:40 -0800)
We can't include sysdep.h in the test case (it introduces lots of
strange failures) so __NR_futex isn't redifined to __NR_futex_time64 by
64-bit time_t 32-bit archs (y2038 safe).

To allow the test to pass let's just do the __NR_futex_time64 syscall if
we don't have __NR_futex defined.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/unix/sysv/linux/tst-clone3.c

index 400eb89a5b895f46598c2f31f004a23b6c85e33b..613cb4a811746a3c406a42b782513866436ef57e 100644 (file)
@@ -56,7 +56,11 @@ f (void *a)
 static inline int
 futex_wait (int *futexp, int val)
 {
+#ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
+#else
+  return syscall (__NR_futex_time64, futexp, FUTEX_WAIT, val);
+#endif
 }
 
 static int