diff options
author | Simonas Kazlauskas <git@kazlauskas.me> | 2020-07-10 02:36:24 +0300 |
---|---|---|
committer | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-07-20 01:16:47 +0900 |
commit | 91fee24f1269cfb622295219d88bfb8ab231976b (patch) | |
tree | fefe526eb8f4ebc899e567f069b918b122282e52 | |
parent | 6b14cfbf936edc2f663f66e331a5e8011fdb7591 (diff) | |
download | rust-libc-91fee24f1269cfb622295219d88bfb8ab231976b.tar.gz |
Move the SEAL constants to freebsd12 module
-rw-r--r-- | libc-test/build.rs | 2 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs | 7 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 696f194978..648b0844a2 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 e0dd712bbd..982855ee5a 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 f35d2834bc..4b224d0573 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 |