This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] tst-clone3: Use __NR_futex_time64 if we don't have __NR_futex
- From: Alistair Francis <alistair dot francis at wdc dot com>
- To: libc-alpha at sourceware dot org
- Cc: alistair23 at gmail dot com, Alistair Francis <alistair dot francis at wdc dot com>
- Date: Tue, 12 Nov 2019 09:36:54 -0800
- Subject: [PATCH] tst-clone3: Use __NR_futex_time64 if we don't have __NR_futex
- Ironport-sdr: Wj7g0N+e9pI+q8ga2fpWNZ/PWyGw6EV6z82FJ+fXOWpwB8SZNKt7MlF4IrTKlz0ibDNYicoxtR 1pNwL7Jm3ULZE8tEpmBJVsvdcUomQxRp4t+YtAlDuzeB01IDmeW0CRVfAoMQf4VSXAfrN2VN5a atzix127e0zMqmvVaoLIGRs3g8p5WW6K+V+Wow9rmF0z+7ZzF18QiyiOJn5xD+rEk3U1jOZq7D oszZtqTpqtQ5TpEoROqGadD5CWviJFWcb1ptrN3Qi8lfSoggMy9Dom6/a100Trr8QCxHVUWv6V hB4=
- Ironport-sdr: ktYZLsU4qEdiNzM9Sv1YUQQ/7NsJPTA6TlJidXV21D9H/tcHGWwdzqL1RTDicnN0ks3Vm3b0Fr tY8UTW6cS/YaDDY0t7N5Z6tUcAbO3hH75Lx2/zoJIIreAyl+mmKeob9AB0NHXwY5a7AcqLtIXf E/XD8IG++OmjTX3O56+spaEGyoXhFrRHF1whY7u9dm3RmjncYnQWk6mZmTQN4+8hzHyu4CPtkO O4ynAnhkoRG+miDLnkwji7z+ilD/MqFludE6ibK888XF4RQoQqNdT/GvFfKjku4sz4YKYiamQb pfxnLslpCfXzxHqpLWrxYBEQ
- Ironport-sdr: CJbHHjbX3x+H2tTjBSLnCNgyluq2baYsGhmQTpfLfOe3rMUscXLs0GdVOVd4sQ4q3+18LmrVXs XsCorbkI3DuZa+1bFkh1p8vV05DdELVz06VTKC+b5Q3KAYsWGbpYwQ+rhJOoeihBiSEuOf7Sxc fSffXK5KrfnBwww9PiDYv7jz1L+lkUhQr9u10AxdClopXcFht7HVGXX49KI7q6Vl0Q8pGdMzc2 HDP5aBaCbcsRmt8dvusC+Qd7j/maMIqqXGAB4kFcx4VUtURcoffYeTAzhJhXLabedcNKXgOKJu ZgA=
- Wdcironportexception: Internal
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.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
sysdeps/unix/sysv/linux/tst-clone3.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 76f8b08a692..c211445e77f 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
--
2.23.0