Add some missing fcntl flags for freebsd
This commit is contained in:
parent
9f581e6256
commit
6b14cfbf93
|
@ -1762,6 +1762,18 @@ fn test_freebsd(target: &str) {
|
|||
|
||||
cfg.skip_const(move |name| {
|
||||
match name {
|
||||
// These constants are to be introduced in yet-unreleased FreeBSD 12.2.
|
||||
"F_ADD_SEALS"
|
||||
| "F_GET_SEALS"
|
||||
| "F_SEAL_SEAL"
|
||||
| "F_SEAL_SHRINK"
|
||||
| "F_SEAL_GROW"
|
||||
| "F_SEAL_WRITE"
|
||||
if Some(12) == freebsd_ver =>
|
||||
{
|
||||
true
|
||||
}
|
||||
|
||||
// These constants were introduced in FreeBSD 12:
|
||||
"SF_USER_READAHEAD"
|
||||
| "EVFILT_EMPTY"
|
||||
|
|
|
@ -1154,6 +1154,23 @@ pub const UF_READONLY: ::c_ulong = 0x00001000;
|
|||
pub const UF_HIDDEN: ::c_ulong = 0x00008000;
|
||||
pub const SF_SNAPSHOT: ::c_ulong = 0x00200000;
|
||||
|
||||
pub const F_OGETLK: ::c_int = 7;
|
||||
pub const F_OSETLK: ::c_int = 8;
|
||||
pub const F_OSETLKW: ::c_int = 9;
|
||||
pub const F_DUP2FD: ::c_int = 10;
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue