Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aa800b9

Browse files
snoggetgross35
authored andcommittedMar 10, 2025
linux/mips: Correct values for SI_TIMER, SI_MESGQ, SI_ASYNCIO
See arch/mips/include/uapi/asm/siginfo.h (backport <rust-lang#4292>) (cherry picked from commit 1f8474e)
1 parent d979c0b commit aa800b9

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
@@ -1293,9 +1293,17 @@ pub const SI_LOAD_SHIFT: c_uint = 16;
12931293
pub const SI_USER: c_int = 0;
12941294
pub const SI_KERNEL: c_int = 0x80;
12951295
pub const SI_QUEUE: c_int = -1;
1296-
pub const SI_TIMER: c_int = -2;
1297-
pub const SI_MESGQ: c_int = -3;
1298-
pub const SI_ASYNCIO: c_int = -4;
1296+
cfg_if! {
1297+
if #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] {
1298+
pub const SI_TIMER: c_int = -2;
1299+
pub const SI_MESGQ: c_int = -3;
1300+
pub const SI_ASYNCIO: c_int = -4;
1301+
} else {
1302+
pub const SI_TIMER: c_int = -3;
1303+
pub const SI_MESGQ: c_int = -4;
1304+
pub const SI_ASYNCIO: c_int = -2;
1305+
}
1306+
}
12991307
pub const SI_SIGIO: c_int = -5;
13001308
pub const SI_TKILL: c_int = -6;
13011309
pub const SI_ASYNCNL: c_int = -60;

0 commit comments

Comments
 (0)
Please sign in to comment.