Skip to content

Commit 7a86c04

Browse files
committed
bsd: Add missing minherit system call
1 parent b841a78 commit 7a86c04

File tree

9 files changed

+41
-0
lines changed

9 files changed

+41
-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
@@ -367,6 +367,10 @@ IFF_SMART
367367
IFF_STATICARP
368368
IFF_UP
369369
IMAXBEL
370+
INHERIT_COPY
371+
INHERIT_NONE
372+
INHERIT_SHARE
373+
INHERIT_ZERO
370374
INIT_PROCESS
371375
IOV_MAX
372376
IPC_CREAT

libc-test/semver/freebsd.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,10 @@ IFF_SIMPLEX
516516
IFF_STATICARP
517517
IFF_UP
518518
IMAXBEL
519+
INHERIT_COPY
520+
INHERIT_NONE
521+
INHERIT_SHARE
522+
INHERIT_ZERO
519523
INIT_PROCESS
520524
IOV_MAX
521525
IPC_CREAT
@@ -1705,6 +1709,10 @@ VDISCARD
17051709
VDSUSP
17061710
VERASE2
17071711
VLNEXT
1712+
VM_INHERIT_COPY
1713+
VM_INHERIT_DONATE_COPY
1714+
VM_INHERIT_NONE
1715+
VM_INHERIT_SHARE
17081716
VM_TOTAL
17091717
VREPRINT
17101718
VSTATUS

libc-test/semver/netbsd.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,10 @@ MAP_ALIGNMENT_MASK
635635
MAP_ALIGNMENT_SHIFT
636636
MAP_FILE
637637
MAP_HASSEMAPHORE
638+
MAP_INHERIT_COPY
639+
MAP_INHERIT_NONE
640+
MAP_INHERIT_SHARE
641+
MAP_INHERIT_ZERO
638642
MAP_NORESERVE
639643
MAP_REMAPDUP
640644
MAP_RENAME

libc-test/semver/openbsd.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,10 @@ MAP_CONCEAL
493493
MAP_COPY
494494
MAP_FILE
495495
MAP_HASSEMAPHORE
496+
MAP_INHERIT_COPY
497+
MAP_INHERIT_NONE
498+
MAP_INHERIT_SHARE
499+
MAP_INHERIT_ZERO
496500
MAP_NOEXTEND
497501
MAP_NORESERVE
498502
MAP_RENAME

src/unix/bsd/apple/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3308,6 +3308,10 @@ pub const VM_PROT_NONE: crate::vm_prot_t = 0x00;
33083308
pub const VM_PROT_READ: crate::vm_prot_t = 0x01;
33093309
pub const VM_PROT_WRITE: crate::vm_prot_t = 0x02;
33103310
pub const VM_PROT_EXECUTE: crate::vm_prot_t = 0x04;
3311+
pub const VM_INHERIT_SHARE: c_int = 0;
3312+
pub const VM_INHERIT_COPY: c_int = 1;
3313+
pub const VM_INHERIT_NONE: c_int = 2;
3314+
pub const VM_INHERIT_DONATE_COPY: c_int = 3;
33113315
pub const MEMORY_OBJECT_NULL: crate::memory_object_t = 0;
33123316
pub const HW_MACHINE: c_int = 1;
33133317
pub const HW_MODEL: c_int = 2;

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,12 @@ pub const MAP_ANONYMOUS: c_int = MAP_ANON;
576576

577577
pub const MAP_FAILED: *mut c_void = !0 as *mut c_void;
578578

579+
// minherit syscall inherit values
580+
pub const INHERIT_SHARE: c_int = 0;
581+
pub const INHERIT_COPY: c_int = 1;
582+
pub const INHERIT_NONE: c_int = 2;
583+
pub const INHERIT_ZERO: c_int = 3;
584+
579585
pub const MCL_CURRENT: c_int = 0x0001;
580586
pub const MCL_FUTURE: c_int = 0x0002;
581587

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"),

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ pub const MAP_ANONYMOUS: c_int = MAP_ANON;
209209

210210
pub const MAP_FAILED: *mut c_void = !0 as *mut c_void;
211211

212+
// minherit syscall inherit values
213+
pub const MAP_INHERIT_SHARE: c_int = 0;
214+
pub const MAP_INHERIT_COPY: c_int = 1;
215+
pub const MAP_INHERIT_NONE: c_int = 2;
216+
pub const MAP_INHERIT_ZERO: c_int = 3;
217+
212218
pub const IPC_CREAT: c_int = 0o001000;
213219
pub const IPC_EXCL: c_int = 0o002000;
214220
pub const IPC_NOWAIT: c_int = 0o004000;

0 commit comments

Comments
 (0)