[RFC,v6,02/23] tst-clone3: Use __NR_futex_time64 if we don't have __NR_futex
diff mbox series

Message ID 9cfff1a1ae34253a2cb4a2a416375d25fc31e75b.1578824547.git.alistair.francis@wdc.com
State New
Headers show
  • RISC-V glibc port for the 32-bit
Related show

Commit Message

Alistair Francis Jan. 12, 2020, 10:33 a.m. UTC
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.
 sysdeps/unix/sysv/linux/tst-clone3.c | 4 ++++
 1 file changed, 4 insertions(+)

diff mbox series

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);
+  return syscall (__NR_futex_time64, futexp, FUTEX_WAIT, val);
 static int