From e8f9f0c671a1c56efec8a1973d1ed03a81cf02c7 Mon Sep 17 00:00:00 2001 From: SteveLauC Date: Sun, 7 Aug 2022 13:50:16 +0800 Subject: [PATCH] feat #1733: add F_GET_SEALS and F_ADD_SEALS on FreeBSD --- src/fcntl.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fcntl.rs b/src/fcntl.rs index 0f0c811f34..5e944093fd 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -378,7 +378,7 @@ pub(crate) fn at_rawfd(fd: Option) -> 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,