From c2fcaca48e9586410110f98a2534015043d9b483 Mon Sep 17 00:00:00 2001 From: Gaurav Jadhav Date: Thu, 15 Oct 2026 19:16:55 +0530 Subject: [PATCH] linux: add SYS_futex for riscv32 GNU riscv32 has no time32 futex syscall, so SYS_futex was removed along with the other time32 numbers. Alias it to SYS_futex_time64, the same way the riscv32 musl module does, so that users such as parking_lot_core that use SYS_futex keep building. time_t is 64-bit on this target, so the time64 syscall takes the same timespec layout. Fixes rust-lang/libc#5627 Sources: - https://github.com/torvalds/linux/blob/v7.1/include/uapi/asm-generic/unistd.h - https://github.com/bminor/glibc/blob/glibc-2.42/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h Signed-off-by: Gaurav Jadhav --- src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs b/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs index a6d78ae642e4..7d833c195054 100644 --- a/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs @@ -594,6 +594,7 @@ pub const SYS_lremovexattr: c_long = 15; pub const SYS_fremovexattr: c_long = 16; pub const SYS_tkill: c_long = 130; pub const SYS_futex_time64: c_long = 422; +pub const SYS_futex: c_long = SYS_futex_time64; pub const SYS_sched_setaffinity: c_long = 122; pub const SYS_sched_getaffinity: c_long = 123; pub const SYS_io_setup: c_long = 0;