diff --git a/libc-test/build.rs b/libc-test/build.rs index c7f707d68d7a1..bf9a876e6a51a 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2743,6 +2743,17 @@ fn test_freebsd(target: &str) { // Added in FreeBSD 14.2 "SO_SPLICE" if Some(14) > freebsd_ver => true, + // Added in FreeBSD 15 + "PROC_LOGSIGEXIT_CTL" + | "PROC_LOGSIGEXIT_STATUS" + | "PROC_LOGSIGEXIT_CTL_NOFORCE" + | "PROC_LOGSIGEXIT_CTL_FORCE_ENABLE" + | "PROC_LOGSIGEXIT_CTL_FORCE_DISABLE" + if Some(15) > freebsd_ver => + { + true + } + _ => false, } }); diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index 24a75ae4d460f..7395c0b424f32 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -1047,6 +1047,12 @@ POSIX_SPAWN_SETSCHEDULER POSIX_SPAWN_SETSIGDEF POSIX_SPAWN_SETSIGMASK PPPDISC +PPROT_CLEAR +PPROT_DESCEND +PPROT_FLAGS +PPROT_INHERIT +PPROT_OP +PPROT_SET PROC_NO_NEW_PRIVS_CTL PROC_NO_NEW_PRIVS_DISABLE PROC_NO_NEW_PRIVS_ENABLE diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index d59944dd06b6b..740388c69903b 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -3011,6 +3011,11 @@ pub const PROC_NO_NEW_PRIVS_CTL: c_int = 19; pub const PROC_NO_NEW_PRIVS_STATUS: c_int = 20; pub const PROC_WXMAP_CTL: c_int = 21; pub const PROC_WXMAP_STATUS: c_int = 22; +pub const PROC_LOGSIGEXIT_CTL: c_int = 23; +pub const PROC_LOGSIGEXIT_STATUS: c_int = 24; +pub const PROC_LOGSIGEXIT_CTL_NOFORCE: c_int = 1; +pub const PROC_LOGSIGEXIT_CTL_FORCE_ENABLE: c_int = 2; +pub const PROC_LOGSIGEXIT_CTL_FORCE_DISABLE: c_int = 3; pub const PROC_PROCCTL_MD_MIN: c_int = 0x10000000; pub const PPROT_SET: c_int = 1; @@ -4809,6 +4814,14 @@ safe_f! { pub {const} fn PR_SCTP_VALID_POLICY(x: c_int) -> bool { PR_SCTP_POLICY(x) <= SCTP_PR_SCTP_MAX } + + pub {const} fn PPROT_OP(o: c_int) -> c_int { + o & 0xf + } + + pub {const} fn PPROT_FLAGS(o: c_int) -> c_int { + o & !0xf + } } cfg_if! {