@@ -10,6 +10,7 @@ pub type nl_item = c_long;
10
10
pub type clockid_t = :: c_int ;
11
11
pub type id_t = u32 ;
12
12
pub type sem_t = * mut sem ;
13
+ pub type key_t = c_long ;
13
14
14
15
#[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
15
16
pub enum timezone { }
63
64
pub l_type: :: c_short,
64
65
pub l_whence: :: c_short,
65
66
}
67
+
68
+ pub struct ipc_perm {
69
+ pub cuid: :: uid_t,
70
+ pub cgid: :: gid_t,
71
+ pub uid: :: uid_t,
72
+ pub gid: :: gid_t,
73
+ pub mode: :: mode_t,
74
+ pub seq: :: c_ushort,
75
+ pub key: :: key_t,
76
+ }
66
77
}
67
78
68
79
pub const D_T_FMT : :: nl_item = 0 ;
@@ -199,9 +210,20 @@ pub const MAP_SHARED: ::c_int = 0x0001;
199
210
pub const MAP_PRIVATE : :: c_int = 0x0002 ;
200
211
pub const MAP_FIXED : :: c_int = 0x0010 ;
201
212
pub const MAP_ANON : :: c_int = 0x1000 ;
213
+ pub const MAP_ANONYMOUS : :: c_int = MAP_ANON ;
202
214
203
215
pub const MAP_FAILED : * mut :: c_void = !0 as * mut :: c_void ;
204
216
217
+ pub const IPC_CREAT : :: c_int = 0o001000 ;
218
+ pub const IPC_EXCL : :: c_int = 0o002000 ;
219
+ pub const IPC_NOWAIT : :: c_int = 0o004000 ;
220
+
221
+ pub const IPC_PRIVATE : :: key_t = 0 ;
222
+
223
+ pub const IPC_RMID : :: c_int = 0 ;
224
+ pub const IPC_SET : :: c_int = 1 ;
225
+ pub const IPC_STAT : :: c_int = 2 ;
226
+
205
227
pub const MCL_CURRENT : :: c_int = 0x0001 ;
206
228
pub const MCL_FUTURE : :: c_int = 0x0002 ;
207
229
@@ -715,6 +737,19 @@ extern "C" {
715
737
pub fn getdomainname ( name : * mut :: c_char , len : :: size_t ) -> :: c_int ;
716
738
pub fn setdomainname ( name : * const :: c_char , len : :: size_t ) -> :: c_int ;
717
739
pub fn uname ( buf : * mut :: utsname ) -> :: c_int ;
740
+
741
+ pub fn shmget ( key : :: key_t , size : :: size_t , shmflg : :: c_int ) -> :: c_int ;
742
+ pub fn shmat (
743
+ shmid : :: c_int ,
744
+ shmaddr : * const :: c_void ,
745
+ shmflg : :: c_int ,
746
+ ) -> * mut :: c_void ;
747
+ pub fn shmdt ( shmaddr : * const :: c_void ) -> :: c_int ;
748
+ pub fn shmctl (
749
+ shmid : :: c_int ,
750
+ cmd : :: c_int ,
751
+ buf : * mut :: shmid_ds ,
752
+ ) -> :: c_int ;
718
753
}
719
754
720
755
cfg_if ! {
0 commit comments