Skip to content

Commit 3d9801d

Browse files
xbjfktgross35
authored andcommitted
musl: time64: update {IPC,MSG,SEM}_STAT definitions
This is primarily based on a small part of bminor/musl@3814333. This also integrates bminor/musl@3c02bac, which update MSG_STAT, SEM_STAT, SEM_STAT_ANY. These are based on the value of IPC_STAT, however we can just use `cfg` as it is effectively the same.
1 parent 793fa97 commit 3d9801d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/unix/linux_like/linux/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//! Linux-specific definitions for linux-like values
2-
32
use crate::prelude::*;
43
use crate::{
54
sock_filter,
@@ -1572,7 +1571,7 @@ pub const RENAME_NOREPLACE: c_uint = 1;
15721571
pub const RENAME_EXCHANGE: c_uint = 2;
15731572
pub const RENAME_WHITEOUT: c_uint = 4;
15741573

1575-
pub const MSG_STAT: c_int = 11;
1574+
pub const MSG_STAT: c_int = 11 | (crate::IPC_STAT & 0x100);
15761575
pub const MSG_INFO: c_int = 12;
15771576
pub const MSG_NOTIFICATION: c_int = 0x8000;
15781577

@@ -1589,9 +1588,9 @@ pub const GETNCNT: c_int = 14;
15891588
pub const GETZCNT: c_int = 15;
15901589
pub const SETVAL: c_int = 16;
15911590
pub const SETALL: c_int = 17;
1592-
pub const SEM_STAT: c_int = 18;
1591+
pub const SEM_STAT: c_int = 18 | (crate::IPC_STAT & 0x100);
15931592
pub const SEM_INFO: c_int = 19;
1594-
pub const SEM_STAT_ANY: c_int = 20;
1593+
pub const SEM_STAT_ANY: c_int = 20 | (crate::IPC_STAT & 0x100);
15951594

15961595
pub const QFMT_VFS_OLD: c_int = 1;
15971596
pub const QFMT_VFS_V0: c_int = 2;

src/unix/linux_like/linux_l4re_shared.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ pub const IPC_NOWAIT: c_int = 0o4000;
976976

977977
pub const IPC_RMID: c_int = 0;
978978
pub const IPC_SET: c_int = 1;
979-
pub const IPC_STAT: c_int = 2;
979+
pub const IPC_STAT: c_int = if cfg!(musl32_time64) { 0x102 } else { 2 };
980980
pub const IPC_INFO: c_int = 3;
981981

982982
pub const SHM_R: c_int = 0o400;

0 commit comments

Comments
 (0)