diff options
author | SteveLauC <stevelauc@outlook.com> | 2022-08-12 12:53:03 +0800 |
---|---|---|
committer | SteveLauC <stevelauc@outlook.com> | 2022-08-12 12:53:03 +0800 |
commit | 29fe67d4cce6c3d79e501a77d3320bb950dc6d0d (patch) | |
tree | 679d47733ad4acfa99760948879f6faa94db9007 /src/fcntl.rs | |
parent | a9861d873eaba52c9bf0f5b02552c567cadf6591 (diff) | |
download | nix-29fe67d4cce6c3d79e501a77d3320bb950dc6d0d.zip |
feat nix-rust#1733: add F_GET_SEALS and F_ADD_SEALS on FreeBSD
Diffstat (limited to 'src/fcntl.rs')
-rw-r--r-- | src/fcntl.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fcntl.rs b/src/fcntl.rs index 0f0c811f..160b022d 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -378,7 +378,7 @@ pub(crate) fn at_rawfd(fd: Option<RawFd>) -> raw::c_int { } } -#[cfg(any(target_os = "android", target_os = "linux"))] +#[cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd"))] #[cfg(feature = "fs")] libc_bitflags!( /// Additional flags for file sealing, which allows for limiting operations on a file. @@ -427,9 +427,9 @@ pub enum FcntlArg<'a> { F_OFD_SETLKW(&'a libc::flock), #[cfg(any(target_os = "linux", target_os = "android"))] F_OFD_GETLK(&'a mut libc::flock), - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd"))] F_ADD_SEALS(SealFlag), - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd"))] F_GET_SEALS, #[cfg(any(target_os = "macos", target_os = "ios"))] F_FULLFSYNC, @@ -475,9 +475,9 @@ pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> { F_OFD_SETLKW(flock) => libc::fcntl(fd, libc::F_OFD_SETLKW, flock), #[cfg(any(target_os = "android", target_os = "linux"))] F_OFD_GETLK(flock) => libc::fcntl(fd, libc::F_OFD_GETLK, flock), - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd"))] F_ADD_SEALS(flag) => libc::fcntl(fd, libc::F_ADD_SEALS, flag.bits()), - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd"))] F_GET_SEALS => libc::fcntl(fd, libc::F_GET_SEALS), #[cfg(any(target_os = "macos", target_os = "ios"))] F_FULLFSYNC => libc::fcntl(fd, libc::F_FULLFSYNC), |