@@ -1018,6 +1018,21 @@ pub const O_WRONLY: ::c_int = 0x0001;
1018
1018
pub const O_RDONLY : :: c_int = 0 ;
1019
1019
pub const O_NONBLOCK : :: c_int = 0x4000 ;
1020
1020
1021
+ // mman.h
1022
+ pub const PROT_NONE : :: c_int = 0x0000 ;
1023
+ pub const PROT_READ : :: c_int = 0x0001 ;
1024
+ pub const PROT_WRITE : :: c_int = 0x0002 ;
1025
+ pub const PROT_EXEC : :: c_int = 0x0004 ;
1026
+
1027
+ pub const MAP_SHARED : :: c_int = 0x0001 ;
1028
+ pub const MAP_PRIVATE : :: c_int = 0x0002 ;
1029
+ pub const MAP_ANON : :: c_int = 0x0004 ;
1030
+ pub const MAP_ANONYMOUS : :: c_int = MAP_ANON ;
1031
+ pub const MAP_FIXED : :: c_int = 0x0010 ;
1032
+ pub const MAP_CONTIG : :: c_int = 0x0020 ;
1033
+
1034
+ pub const MAP_FAILED : * mut :: c_void = !0 as * mut :: c_void ;
1035
+
1021
1036
#[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
1022
1037
pub enum FILE { }
1023
1038
impl :: Copy for FILE { }
@@ -1218,6 +1233,8 @@ extern "C" {
1218
1233
) -> * mut :: c_void ;
1219
1234
pub fn munmap ( addr : * mut :: c_void , len : :: size_t ) -> :: c_int ;
1220
1235
pub fn truncate ( path : * const c_char , length : off_t ) -> :: c_int ;
1236
+ pub fn shm_open ( name : * const :: c_char , oflag : :: c_int , mode : :: mode_t ) -> :: c_int ;
1237
+ pub fn shm_unlink ( name : * const :: c_char ) -> :: c_int ;
1221
1238
1222
1239
pub fn gettimeofday ( tp : * mut :: timeval , tz : * mut :: c_void ) -> :: c_int ;
1223
1240
pub fn pthread_exit ( value : * mut :: c_void ) -> !;
@@ -1909,19 +1926,19 @@ cfg_if! {
1909
1926
if #[ cfg( target_arch = "aarch64" ) ] {
1910
1927
mod aarch64;
1911
1928
pub use self :: aarch64:: * ;
1912
- } else if #[ cfg( any ( target_arch = "arm" ) ) ] {
1929
+ } else if #[ cfg( target_arch = "arm" ) ] {
1913
1930
mod arm;
1914
1931
pub use self :: arm:: * ;
1915
- } else if #[ cfg( any ( target_arch = "x86" ) ) ] {
1932
+ } else if #[ cfg( target_arch = "x86" ) ] {
1916
1933
mod x86;
1917
1934
pub use self :: x86:: * ;
1918
- } else if #[ cfg( any ( target_arch = "x86_64" ) ) ] {
1935
+ } else if #[ cfg( target_arch = "x86_64" ) ] {
1919
1936
mod x86_64;
1920
1937
pub use self :: x86_64:: * ;
1921
- } else if #[ cfg( any ( target_arch = "powerpc" ) ) ] {
1938
+ } else if #[ cfg( target_arch = "powerpc" ) ] {
1922
1939
mod powerpc;
1923
1940
pub use self :: powerpc:: * ;
1924
- } else if #[ cfg( any ( target_arch = "powerpc64" ) ) ] {
1941
+ } else if #[ cfg( target_arch = "powerpc64" ) ] {
1925
1942
mod powerpc64;
1926
1943
pub use self :: powerpc64:: * ;
1927
1944
} else {
0 commit comments