Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1545,6 +1545,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
Expand Down
4 changes: 4 additions & 0 deletions libc-test/semver/dragonfly.txt
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ IFF_SMART
IFF_STATICARP
IFF_UP
IMAXBEL
INHERIT_COPY
INHERIT_NONE
INHERIT_SHARE
INHERIT_ZERO
INIT_PROCESS
IOV_MAX
IPC_CREAT
Expand Down
8 changes: 8 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,10 @@ IFF_SIMPLEX
IFF_STATICARP
IFF_UP
IMAXBEL
INHERIT_COPY
INHERIT_NONE
INHERIT_SHARE
INHERIT_ZERO
INIT_PROCESS
IOV_MAX
IPC_CREAT
Expand Down Expand Up @@ -1705,6 +1709,10 @@ VDISCARD
VDSUSP
VERASE2
VLNEXT
VM_INHERIT_COPY
VM_INHERIT_DONATE_COPY
VM_INHERIT_NONE
VM_INHERIT_SHARE
VM_TOTAL
VREPRINT
VSTATUS
Expand Down
5 changes: 5 additions & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,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
Expand Down
4 changes: 4 additions & 0 deletions libc-test/semver/openbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,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
Expand Down
4 changes: 4 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3308,6 +3308,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;
Expand Down
6 changes: 6 additions & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,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;

Expand Down
1 change: 1 addition & 0 deletions src/unix/bsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,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"),
Expand Down
9 changes: 9 additions & 0 deletions src/unix/bsd/netbsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@ 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 MAP_INHERIT_SHARE: c_int = 0;
pub const MAP_INHERIT_COPY: c_int = 1;
pub const MAP_INHERIT_NONE: c_int = 2;
#[cfg(target_os = "netbsd")]
pub const MAP_INHERIT_DONATE_COPY: c_int = 3;
#[cfg(target_os = "netbsd")]
pub const MAP_INHERIT_ZERO: c_int = 4;

pub const IPC_CREAT: c_int = 0o001000;
pub const IPC_EXCL: c_int = 0o002000;
pub const IPC_NOWAIT: c_int = 0o004000;
Expand Down