Skip to content

Commit 91fee24

Browse files
nagisaJohnTitor
authored andcommitted
Move the SEAL constants to freebsd12 module
1 parent 6b14cfb commit 91fee24

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

libc-test/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,7 @@ fn test_freebsd(target: &str) {
17691769
| "F_SEAL_SHRINK"
17701770
| "F_SEAL_GROW"
17711771
| "F_SEAL_WRITE"
1772-
if Some(12) == freebsd_ver =>
1772+
if Some(12) <= freebsd_ver =>
17731773
{
17741774
true
17751775
}

src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,13 @@ cfg_if! {
190190
}
191191
}
192192

193+
pub const F_ADD_SEALS: ::c_int = 19;
194+
pub const F_GET_SEALS: ::c_int = 20;
195+
pub const F_SEAL_SEAL: ::c_int = 0x0001;
196+
pub const F_SEAL_SHRINK: ::c_int = 0x0002;
197+
pub const F_SEAL_GROW: ::c_int = 0x0004;
198+
pub const F_SEAL_WRITE: ::c_int = 0x0008;
199+
193200
cfg_if! {
194201
if #[cfg(not(freebsd13))] {
195202
pub const ELAST: ::c_int = 96;

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,14 +1162,6 @@ pub const F_SETLK_REMOTE: ::c_int = 14;
11621162
pub const F_READAHEAD: ::c_int = 15;
11631163
pub const F_RDAHEAD: ::c_int = 16;
11641164
pub const F_DUP2FD_CLOEXEC: ::c_int = 18;
1165-
pub const F_ADD_SEALS: ::c_int = 19;
1166-
pub const F_GET_SEALS: ::c_int = 20;
1167-
1168-
pub const F_SEAL_SEAL: ::c_int = 0x0001;
1169-
pub const F_SEAL_SHRINK: ::c_int = 0x0002;
1170-
pub const F_SEAL_GROW: ::c_int = 0x0004;
1171-
pub const F_SEAL_WRITE: ::c_int = 0x0008;
1172-
11731165

11741166
fn _ALIGN(p: usize) -> usize {
11751167
(p + _ALIGNBYTES) & !_ALIGNBYTES

0 commit comments

Comments
 (0)