diff mbox series

[v2] Force 64-bit time based syscalls for TIMESIZE==64

Message ID 20200312183325.594-1-vgupta@synopsys.com
State New
Headers show
Series [v2] Force 64-bit time based syscalls for TIMESIZE==64 | expand

Commit Message

Vineet Gupta March 12, 2020, 6:33 p.m. UTC
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
Changes since v1
  - don't redirect these to 64-bit variants
---
 sysdeps/unix/sysv/linux/generic/sysdep.h | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/generic/sysdep.h b/sysdeps/unix/sysv/linux/generic/sysdep.h
index 40b4b955ca1b..21facbad818a 100644
--- a/sysdeps/unix/sysv/linux/generic/sysdep.h
+++ b/sysdeps/unix/sysv/linux/generic/sysdep.h
@@ -17,6 +17,7 @@ 
    <https://www.gnu.org/licenses/>.  */
 
 #include <bits/wordsize.h>
+#include <bits/timesize.h>
 #include <kernel-features.h>
 #include <sysdeps/unix/sysdep.h>
 #include <sysdeps/unix/sysv/linux/sysdep.h>
@@ -25,3 +26,25 @@ 
 #ifdef __NR_llseek
 # define __NR__llseek __NR_llseek
 #endif
+
+#if __WORDSIZE == 32 && __TIMESIZE == 64
+
+/* Don't provide 32-bit time syscalls.
+   Older variants of asm-generic ABIs can provide those (e.g. ARC).  */
+
+# undef __NR_futex
+# undef __NR_rt_sigtimedwait
+# undef __NR_ppoll
+# undef __NR_utimensat
+# undef __NR_pselect6
+# undef __NR_recvmmsg
+# undef __NR_semtimedop
+# undef __NR_mq_timedreceive
+# undef __NR_mq_timedsend
+# undef __NR_clock_getres
+# undef __NR_timerfd_settime
+# undef __NR_timerfd_gettime
+# undef __NR_sched_rr_get_interval
+# undef __NR_clock_adjtime
+
+#endif