Skip to content

Commit 7999bcf

Browse files
committed
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 53d1495 commit 7999bcf

File tree

1 file changed

+20
-4
lines changed
  • src/unix/linux_like/linux

1 file changed

+20
-4
lines changed

src/unix/linux_like/linux/mod.rs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,9 +2851,17 @@ pub const IPC_NOWAIT: c_int = 0o4000;
28512851

28522852
pub const IPC_RMID: c_int = 0;
28532853
pub const IPC_SET: c_int = 1;
2854-
pub const IPC_STAT: c_int = 2;
2854+
pub const IPC_STAT: c_int = if cfg!(musl32_time64) {
2855+
0x102
2856+
} else {
2857+
2
2858+
};
28552859
pub const IPC_INFO: c_int = 3;
2856-
pub const MSG_STAT: c_int = 11;
2860+
pub const MSG_STAT: c_int = if cfg!(musl32_time64) {
2861+
0x10b
2862+
} else {
2863+
11
2864+
};
28572865
pub const MSG_INFO: c_int = 12;
28582866
pub const MSG_NOTIFICATION: c_int = 0x8000;
28592867

@@ -2870,9 +2878,17 @@ pub const GETNCNT: c_int = 14;
28702878
pub const GETZCNT: c_int = 15;
28712879
pub const SETVAL: c_int = 16;
28722880
pub const SETALL: c_int = 17;
2873-
pub const SEM_STAT: c_int = 18;
2881+
pub const SEM_STAT: c_int = if cfg!(musl32_time64) {
2882+
0x112
2883+
} else {
2884+
18
2885+
};
28742886
pub const SEM_INFO: c_int = 19;
2875-
pub const SEM_STAT_ANY: c_int = 20;
2887+
pub const SEM_STAT_ANY: c_int = if cfg!(musl32_time64) {
2888+
0x114
2889+
} else {
2890+
20
2891+
};
28762892

28772893
pub const SHM_R: c_int = 0o400;
28782894
pub const SHM_W: c_int = 0o200;

0 commit comments

Comments
 (0)