diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index a86287d1cb471..4eb2ee70a582b 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1643,6 +1643,10 @@ UTUN_OPT_IFNAME VDISCARD VDSUSP VLNEXT +VM_INHERIT_COPY +VM_INHERIT_DONATE_COPY +VM_INHERIT_NONE +VM_INHERIT_SHARE VM_LOADAVG VM_MACHFACTOR VM_MAKE_TAG diff --git a/libc-test/semver/dragonfly.txt b/libc-test/semver/dragonfly.txt index 4636e3761465a..5ace8f371f79c 100644 --- a/libc-test/semver/dragonfly.txt +++ b/libc-test/semver/dragonfly.txt @@ -381,6 +381,10 @@ IFF_SMART IFF_STATICARP IFF_UP IMAXBEL +INHERIT_COPY +INHERIT_NONE +INHERIT_SHARE +INHERIT_ZERO INIT_PROCESS IOV_MAX IPC_CREAT diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index a26355468d608..45820db4b2ac3 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -539,6 +539,10 @@ IN6_IFF_NODAD IN6_IFF_PREFER_SOURCE IN6_IFF_TEMPORARY IN6_IFF_TENTATIVE +INHERIT_COPY +INHERIT_NONE +INHERIT_SHARE +INHERIT_ZERO INIT_PROCESS IOV_MAX IPC_CREAT @@ -1738,6 +1742,10 @@ VDISCARD VDSUSP VERASE2 VLNEXT +VM_INHERIT_COPY +VM_INHERIT_DONATE_COPY +VM_INHERIT_NONE +VM_INHERIT_SHARE VM_TOTAL VREPRINT VSTATUS diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt index 182d4e2b5a7b2..5efd7a758148a 100644 --- a/libc-test/semver/netbsd.txt +++ b/libc-test/semver/netbsd.txt @@ -650,6 +650,11 @@ MAP_ALIGNMENT_MASK MAP_ALIGNMENT_SHIFT MAP_FILE MAP_HASSEMAPHORE +MAP_INHERIT_COPY +MAP_INHERIT_DONATE_COPY +MAP_INHERIT_NONE +MAP_INHERIT_SHARE +MAP_INHERIT_ZERO MAP_NORESERVE MAP_REMAPDUP MAP_RENAME diff --git a/libc-test/semver/openbsd.txt b/libc-test/semver/openbsd.txt index b92a8d1edaa6a..d6808bcf98742 100644 --- a/libc-test/semver/openbsd.txt +++ b/libc-test/semver/openbsd.txt @@ -510,6 +510,10 @@ MAP_CONCEAL MAP_COPY MAP_FILE MAP_HASSEMAPHORE +MAP_INHERIT_COPY +MAP_INHERIT_NONE +MAP_INHERIT_SHARE +MAP_INHERIT_ZERO MAP_NOEXTEND MAP_NORESERVE MAP_RENAME diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index f42728275ac0c..852f2002a4222 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -3365,6 +3365,10 @@ pub const VM_PROT_NONE: crate::vm_prot_t = 0x00; pub const VM_PROT_READ: crate::vm_prot_t = 0x01; pub const VM_PROT_WRITE: crate::vm_prot_t = 0x02; pub const VM_PROT_EXECUTE: crate::vm_prot_t = 0x04; +pub const VM_INHERIT_SHARE: c_int = 0; +pub const VM_INHERIT_COPY: c_int = 1; +pub const VM_INHERIT_NONE: c_int = 2; +pub const VM_INHERIT_DONATE_COPY: c_int = 3; pub const MEMORY_OBJECT_NULL: crate::memory_object_t = 0; pub const HW_MACHINE: c_int = 1; pub const HW_MODEL: c_int = 2; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index cc11040b086f3..3c4c99c9e5e74 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -579,6 +579,12 @@ pub const MAP_ANONYMOUS: c_int = MAP_ANON; pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; +// minherit syscall inherit values +pub const INHERIT_SHARE: c_int = 0; +pub const INHERIT_COPY: c_int = 1; +pub const INHERIT_NONE: c_int = 2; +pub const INHERIT_ZERO: c_int = 3; + pub const MCL_CURRENT: c_int = 0x0001; pub const MCL_FUTURE: c_int = 0x0002; diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 229020abe5083..dc8afe49f3d62 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -618,6 +618,7 @@ extern "C" { )] pub fn telldir(dirp: *mut crate::DIR) -> c_long; pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; + pub fn minherit(addr: *mut c_void, len: size_t, inherit: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 2d888513a4e13..21b747d6ecc81 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -1111,6 +1111,13 @@ pub const MAP_ALIGNMENT_64PB: c_int = 56 << MAP_ALIGNMENT_SHIFT; // mremap flag pub const MAP_REMAPDUP: c_int = 0x004; +// minherit syscall inherit values +pub const MAP_INHERIT_SHARE: c_int = 0; +pub const MAP_INHERIT_COPY: c_int = 1; +pub const MAP_INHERIT_NONE: c_int = 2; +pub const MAP_INHERIT_DONATE_COPY: c_int = 3; +pub const MAP_INHERIT_ZERO: c_int = 4; + pub const DCCP_TYPE_REQUEST: c_int = 0; pub const DCCP_TYPE_RESPONSE: c_int = 1; pub const DCCP_TYPE_DATA: c_int = 2; diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs index 7fea82add387f..127d0a1e51d1a 100644 --- a/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -1096,6 +1096,12 @@ pub const MAP_NORESERVE: c_int = 0x0000; pub const MAP_HASSEMAPHORE: c_int = 0x0000; pub const MAP_TRYFIXED: c_int = 0; +// minherit syscall inherit values +pub const MAP_INHERIT_SHARE: c_int = 0; +pub const MAP_INHERIT_COPY: c_int = 1; +pub const MAP_INHERIT_NONE: c_int = 2; +pub const MAP_INHERIT_ZERO: c_int = 3; + pub const EIPSEC: c_int = 82; pub const ENOMEDIUM: c_int = 85; pub const EMEDIUMTYPE: c_int = 86;