Move the SEAL constants to freebsd12 module

This commit is contained in:
Simonas Kazlauskas 2020-07-10 02:36:24 +03:00 committed by Yuki Okushi
parent 6b14cfbf93
commit 91fee24f12
No known key found for this signature in database
GPG Key ID: B0986C85C0E2DAA1
3 changed files with 8 additions and 9 deletions

View File

@ -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
}

View File

@ -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;

View File

@ -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