From 1f8474e2e4c34851ad339cf3948e7e5610878232 Mon Sep 17 00:00:00 2001 From: Ola x Nilsson Date: Fri, 28 Feb 2025 16:58:36 +0100 Subject: [PATCH] linux/mips: Correct values for SI_TIMER, SI_MESGQ, SI_ASYNCIO See arch/mips/include/uapi/asm/siginfo.h --- src/unix/linux_like/mod.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index a0db670849153..5475a8a4ee5b9 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -1292,9 +1292,17 @@ pub const SI_LOAD_SHIFT: c_uint = 16; pub const SI_USER: c_int = 0; pub const SI_KERNEL: c_int = 0x80; pub const SI_QUEUE: c_int = -1; -pub const SI_TIMER: c_int = -2; -pub const SI_MESGQ: c_int = -3; -pub const SI_ASYNCIO: c_int = -4; +cfg_if! { + if #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] { + pub const SI_TIMER: c_int = -2; + pub const SI_MESGQ: c_int = -3; + pub const SI_ASYNCIO: c_int = -4; + } else { + pub const SI_TIMER: c_int = -3; + pub const SI_MESGQ: c_int = -4; + pub const SI_ASYNCIO: c_int = -2; + } +} pub const SI_SIGIO: c_int = -5; pub const SI_TKILL: c_int = -6; pub const SI_ASYNCNL: c_int = -60;