Skip to content

Commit 3d3392b

Browse files
committed
musl: mips64: Use special MIPS definition of stack_t
stack_t is sigaltstack, which in musl has a special definition for MIPS that switches around ss_size and ss_flags. The 32-bit definition was already correct. See: https://git.musl-libc.org/cgit/musl/tree/arch/mips64/bits/signal.h#n67 Signed-off-by: Jens Reidel <adrian@travitia.xyz>
1 parent 8e6f36c commit 3d3392b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/unix/linux_like/linux/musl/b64/mips64.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ s! {
5656
__pad5: [c_int; 14],
5757
}
5858

59+
pub struct stack_t {
60+
pub ss_sp: *mut c_void,
61+
pub ss_size: size_t,
62+
pub ss_flags: c_int,
63+
}
64+
5965
pub struct ipc_perm {
6066
#[cfg(musl_v1_2_3)]
6167
pub __key: crate::key_t,

src/unix/linux_like/linux/musl/b64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ use crate::prelude::*;
33
pub type regoff_t = c_long;
44

55
s! {
6+
// MIPS implementation is special, see the subfolder.
7+
#[cfg(not(target_arch = "mips64"))]
68
pub struct stack_t {
79
pub ss_sp: *mut c_void,
810
pub ss_flags: c_int,

0 commit comments

Comments
 (0)