about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2019-11-11 15:07:19 -0800
committerAlistair Francis <alistair.francis@wdc.com>2020-02-14 14:40:34 -0800
commitf6a9b6b08ea0fddad48d908729f866d3c30955ed (patch)
tree6b2cbf8f3b63636ea0de15c6dbe2e092af5b2d15 /sysdeps/unix/sysv
parenta803367bab167f5ec4fde1f0d0ec447707c29520 (diff)
downloadglibc-f6a9b6b08ea0fddad48d908729f866d3c30955ed.tar.gz
glibc-f6a9b6b08ea0fddad48d908729f866d3c30955ed.tar.xz
glibc-f6a9b6b08ea0fddad48d908729f866d3c30955ed.zip
tst-clone3: Use __NR_futex_time64 if we don't have __NR_futex
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>
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/tst-clone3.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 400eb89a5b..613cb4a811 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -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