Skip to content

Commit 8530b90

Browse files
committed
bsd: Add missing minherit system call
1 parent d58c1f4 commit 8530b90

File tree

7 files changed

+26
-0
lines changed

7 files changed

+26
-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

libc-test/semver/dragonfly.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,10 @@ UF_NOUNLINK
10861086
UF_OPAQUE
10871087
UF_SETTABLE
10881088
UF_XLINK
1089+
VM_INHERIT_COPY
1090+
VM_INHERIT_DONATE_COPY
1091+
VM_INHERIT_NONE
1092+
VM_INHERIT_SHARE
10891093
USER_BC_BASE_MAX
10901094
USER_BC_DIM_MAX
10911095
USER_BC_SCALE_MAX

libc-test/semver/freebsd.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,6 +1705,10 @@ VDISCARD
17051705
VDSUSP
17061706
VERASE2
17071707
VLNEXT
1708+
VM_INHERIT_COPY
1709+
VM_INHERIT_DONATE_COPY
1710+
VM_INHERIT_NONE
1711+
VM_INHERIT_SHARE
17081712
VM_TOTAL
17091713
VREPRINT
17101714
VSTATUS

libc-test/semver/netbsd.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,10 @@ UT_NAMESIZE
10851085
VDISCARD
10861086
VDSUSP
10871087
VLNEXT
1088+
VM_INHERIT_COPY
1089+
VM_INHERIT_DONATE_COPY
1090+
VM_INHERIT_NONE
1091+
VM_INHERIT_SHARE
10881092
VM_PROC
10891093
VM_PROC_MAP
10901094
VREPRINT

libc-test/semver/openbsd.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,10 @@ UT_NAMESIZE
913913
VDISCARD
914914
VDSUSP
915915
VLNEXT
916+
VM_INHERIT_COPY
917+
VM_INHERIT_DONATE_COPY
918+
VM_INHERIT_NONE
919+
VM_INHERIT_SHARE
916920
VREPRINT
917921
VSTATUS
918922
VWERASE

src/unix/bsd/apple/mod.rs

Lines changed: 5 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;

src/unix/bsd/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ extern "C" {
658658
)]
659659
pub fn telldir(dirp: *mut crate::DIR) -> c_long;
660660
pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int;
661+
pub fn minherit(addr: *mut c_void, len: size_t, inherit: c_int) -> c_int;
661662

662663
#[cfg_attr(
663664
all(target_os = "macos", target_arch = "x86"),

0 commit comments

Comments
 (0)