1Use SYS_futex for syscall 2 3glibc defines SYS_futex and on newer 32bit CPUs like RISCV-32, arc there 4is no 32bit time_t therefore define SYS_futex in terms of SYS_futex_time64 5 6Upstream-Status: Pending 7Signed-off-by: Khem Raj <raj.khem@gmail.com> 8 9--- a/storage/innobase/sync/srw_lock.cc 10+++ b/storage/innobase/sync/srw_lock.cc 11@@ -210,6 +210,12 @@ void ssux_lock_low::wake() { WakeByAddre 12 # ifdef __linux__ 13 # include <linux/futex.h> 14 # include <sys/syscall.h> 15+/** Newer 32bit CPUs eg. RISCV-32 are defaulting to 64bit time_t from get go and 16+ therefore do not define __NR_futex */ 17+# if !defined(SYS_futex) && defined(SYS_futex_time64) 18+# define SYS_futex SYS_futex_time64 19+# endif 20+ 21 # define SRW_FUTEX(a,op,n) \ 22 syscall(SYS_futex, a, FUTEX_ ## op ## _PRIVATE, n, nullptr, nullptr, 0) 23 # elif defined __OpenBSD__ 24