diff --git a/libc-test/build.rs b/libc-test/build.rs index 696f19497815de015c6ddb26d6c84d2dbd758b32..648b0844a21d8ffd215e986d94fdb0fbf429476b 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -1769,7 +1769,7 @@ fn test_freebsd(target: &str) { | "F_SEAL_SHRINK" | "F_SEAL_GROW" | "F_SEAL_WRITE" - if Some(12) == freebsd_ver => + if Some(12) <= freebsd_ver => { true } diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs index e0dd712bbd957807d42f18c9defebb4c4a930726..982855ee5a34e9f3af156a3d153a11c36019e9de 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs @@ -190,6 +190,13 @@ cfg_if! { } } +pub const F_ADD_SEALS: ::c_int = 19; +pub const F_GET_SEALS: ::c_int = 20; +pub const F_SEAL_SEAL: ::c_int = 0x0001; +pub const F_SEAL_SHRINK: ::c_int = 0x0002; +pub const F_SEAL_GROW: ::c_int = 0x0004; +pub const F_SEAL_WRITE: ::c_int = 0x0008; + cfg_if! { if #[cfg(not(freebsd13))] { pub const ELAST: ::c_int = 96; diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index f35d2834bc90512a35ee59140758612c56d9f35b..4b224d057314fa72aec447d0c3b0c9e3f690710e 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -1162,14 +1162,6 @@ pub const F_SETLK_REMOTE: ::c_int = 14; pub const F_READAHEAD: ::c_int = 15; pub const F_RDAHEAD: ::c_int = 16; pub const F_DUP2FD_CLOEXEC: ::c_int = 18; -pub const F_ADD_SEALS: ::c_int = 19; -pub const F_GET_SEALS: ::c_int = 20; - -pub const F_SEAL_SEAL: ::c_int = 0x0001; -pub const F_SEAL_SHRINK: ::c_int = 0x0002; -pub const F_SEAL_GROW: ::c_int = 0x0004; -pub const F_SEAL_WRITE: ::c_int = 0x0008; - fn _ALIGN(p: usize) -> usize { (p + _ALIGNBYTES) & !_ALIGNBYTES