Skip to content

Commit 678ab86

Browse files
committed
apple: Add missing minherit system call
1 parent d58c1f4 commit 678ab86

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libc-test/semver/apple.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,10 @@ UTUN_OPT_IFNAME
15451545
VDISCARD
15461546
VDSUSP
15471547
VLNEXT
1548+
VM_INHERIT_COPY
1549+
VM_INHERIT_DONATE_COPY
1550+
VM_INHERIT_NONE
1551+
VM_INHERIT_SHARE
15481552
VM_LOADAVG
15491553
VM_MACHFACTOR
15501554
VM_MAKE_TAG

src/unix/bsd/apple/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,6 +1939,11 @@ pub const PROT_READ: c_int = 1;
19391939
pub const PROT_WRITE: c_int = 2;
19401940
pub const PROT_EXEC: c_int = 4;
19411941

1942+
pub const VM_INHERIT_SHARE: c_int = 0;
1943+
pub const VM_INHERIT_COPY: c_int = 1;
1944+
pub const VM_INHERIT_NONE: c_int = 2;
1945+
pub const VM_INHERIT_DONATE_COPY: c_int = 3;
1946+
19421947
pub const PT_TRACE_ME: c_int = 0;
19431948
pub const PT_READ_I: c_int = 1;
19441949
pub const PT_READ_D: c_int = 2;
@@ -4176,6 +4181,7 @@ extern "C" {
41764181
link_name = "mprotect$UNIX2003"
41774182
)]
41784183
pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int;
4184+
pub fn minherit(addr: *mut c_void, len: size_t, inherit: c_int) -> c_int;
41794185
pub fn semget(key: key_t, nsems: c_int, semflg: c_int) -> c_int;
41804186
#[cfg_attr(
41814187
all(target_os = "macos", target_arch = "x86"),

0 commit comments

Comments
 (0)