Skip to content

Commit 1f8474e

Browse files
committed
linux/mips: Correct values for SI_TIMER, SI_MESGQ, SI_ASYNCIO
See arch/mips/include/uapi/asm/siginfo.h
1 parent e021460 commit 1f8474e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/unix/linux_like/mod.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -1292,9 +1292,17 @@ pub const SI_LOAD_SHIFT: c_uint = 16;
12921292
pub const SI_USER: c_int = 0;
12931293
pub const SI_KERNEL: c_int = 0x80;
12941294
pub const SI_QUEUE: c_int = -1;
1295-
pub const SI_TIMER: c_int = -2;
1296-
pub const SI_MESGQ: c_int = -3;
1297-
pub const SI_ASYNCIO: c_int = -4;
1295+
cfg_if! {
1296+
if #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] {
1297+
pub const SI_TIMER: c_int = -2;
1298+
pub const SI_MESGQ: c_int = -3;
1299+
pub const SI_ASYNCIO: c_int = -4;
1300+
} else {
1301+
pub const SI_TIMER: c_int = -3;
1302+
pub const SI_MESGQ: c_int = -4;
1303+
pub const SI_ASYNCIO: c_int = -2;
1304+
}
1305+
}
12981306
pub const SI_SIGIO: c_int = -5;
12991307
pub const SI_TKILL: c_int = -6;
13001308
pub const SI_ASYNCNL: c_int = -60;

0 commit comments

Comments
 (0)