[RFC,v3,08/23] RISC-V: define __NR_futex as __NR_futex_time64 for 32-bit
diff mbox series

Message ID 81e1f1f6afe13b81d0c98b38299e7c852ee6903a.1563321715.git.alistair.francis@wdc.com
State New
Headers show
Series
  • [RFC,v3,01/23] sysdeps/nanosleep: Use clock_nanosleep_time64 if avaliable
Related show

Commit Message

Alistair Francis July 17, 2019, 12:09 a.m. UTC
The futex syscall isn't avaliable on R32 so let's define it to
be futex_time64 instead.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 sysdeps/unix/sysv/linux/riscv/sysdep.h | 9 +++++++++
 1 file changed, 9 insertions(+)

Patch
diff mbox series

diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
index 5470ea3d2a..b7607ef9f1 100644
--- a/sysdeps/unix/sysv/linux/riscv/sysdep.h
+++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h
@@ -116,6 +116,15 @@ 
 
 #include <sysdeps/unix/sysdep.h>
 
+#if __riscv_xlen == 32
+/* Define the __NR_futex as __NR_futex64 as RV32 doesn't have a
+ * __NR_futex syscall.
+ */
+# ifndef __NR_futex
+#  define __NR_futex __NR_futex_time64
+# endif
+#endif
+
 #undef SYS_ify
 #define SYS_ify(syscall_name)	__NR_##syscall_name