Skip to content

Commit 1ac2a19

Browse files
committed
musl: powerpc64: Decommonize definition of shmid_ds
powerpc64 is the only 64-bit target that doesn't use the generic definition for these in musl. See https://git.musl-libc.org/cgit/musl/tree/arch/powerpc64/bits/shm.h#n3 Signed-off-by: Jens Reidel <adrian@travitia.xyz>
1 parent be45368 commit 1ac2a19

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ s! {
1717
__val: [c_ulong; 16],
1818
}
1919

20+
// PowerPC implementation is special, see the subfolder.
21+
#[cfg(not(target_arch = "powerpc64"))]
2022
pub struct shmid_ds {
2123
pub shm_perm: crate::ipc_perm,
2224
pub shm_segsz: size_t,

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ s! {
5050
__reserved: [c_long; 3],
5151
}
5252

53+
pub struct shmid_ds {
54+
pub shm_perm: crate::ipc_perm,
55+
pub shm_atime: crate::time_t,
56+
pub shm_dtime: crate::time_t,
57+
pub shm_ctime: crate::time_t,
58+
pub shm_segsz: size_t,
59+
pub shm_cpid: crate::pid_t,
60+
pub shm_lpid: crate::pid_t,
61+
pub shm_nattch: c_ulong,
62+
__unused: [c_ulong; 2],
63+
}
64+
5365
pub struct ipc_perm {
5466
#[cfg(musl_v1_2_3)]
5567
pub __key: crate::key_t,

0 commit comments

Comments
 (0)