@@ -10,6 +10,7 @@ pub type nl_item = c_long;
1010pub type clockid_t = :: c_int ;
1111pub type id_t = u32 ;
1212pub type sem_t = * mut sem ;
13+ pub type key_t = c_long ;
1314
1415#[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
1516pub enum timezone { }
6364 pub l_type: :: c_short,
6465 pub l_whence: :: c_short,
6566 }
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+ }
6677}
6778
6879pub const D_T_FMT : :: nl_item = 0 ;
@@ -199,9 +210,20 @@ pub const MAP_SHARED: ::c_int = 0x0001;
199210pub const MAP_PRIVATE : :: c_int = 0x0002 ;
200211pub const MAP_FIXED : :: c_int = 0x0010 ;
201212pub const MAP_ANON : :: c_int = 0x1000 ;
213+ pub const MAP_ANONYMOUS : :: c_int = MAP_ANON ;
202214
203215pub const MAP_FAILED : * mut :: c_void = !0 as * mut :: c_void ;
204216
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+
205227pub const MCL_CURRENT : :: c_int = 0x0001 ;
206228pub const MCL_FUTURE : :: c_int = 0x0002 ;
207229
@@ -715,6 +737,19 @@ extern "C" {
715737 pub fn getdomainname ( name : * mut :: c_char , len : :: size_t ) -> :: c_int ;
716738 pub fn setdomainname ( name : * const :: c_char , len : :: size_t ) -> :: c_int ;
717739 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 ;
718753}
719754
720755cfg_if ! {
0 commit comments