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>
This commit is contained in:
Alistair Francis 2019-11-11 15:07:19 -08:00
parent a803367bab
commit f6a9b6b08e
1 changed files with 4 additions and 0 deletions

View 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