Skip to content

Commit 5252f7e

Browse files
bors[bot]SteveLauC
andauthored
Merge #1782
1782: feat #1733: add F_GET_SEALS and F_ADD_SEALS on FreeBSD r=rtzoeller a=SteveLauC Closes #1733 Co-authored-by: SteveLauC <stevelauc@outlook.com>
2 parents ffc793e + 29fe67d commit 5252f7e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/fcntl.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ pub(crate) fn at_rawfd(fd: Option<RawFd>) -> raw::c_int {
378378
}
379379
}
380380

381-
#[cfg(any(target_os = "android", target_os = "linux"))]
381+
#[cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd"))]
382382
#[cfg(feature = "fs")]
383383
libc_bitflags!(
384384
/// Additional flags for file sealing, which allows for limiting operations on a file.
@@ -427,9 +427,9 @@ pub enum FcntlArg<'a> {
427427
F_OFD_SETLKW(&'a libc::flock),
428428
#[cfg(any(target_os = "linux", target_os = "android"))]
429429
F_OFD_GETLK(&'a mut libc::flock),
430-
#[cfg(any(target_os = "android", target_os = "linux"))]
430+
#[cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd"))]
431431
F_ADD_SEALS(SealFlag),
432-
#[cfg(any(target_os = "android", target_os = "linux"))]
432+
#[cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd"))]
433433
F_GET_SEALS,
434434
#[cfg(any(target_os = "macos", target_os = "ios"))]
435435
F_FULLFSYNC,
@@ -475,9 +475,9 @@ pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> {
475475
F_OFD_SETLKW(flock) => libc::fcntl(fd, libc::F_OFD_SETLKW, flock),
476476
#[cfg(any(target_os = "android", target_os = "linux"))]
477477
F_OFD_GETLK(flock) => libc::fcntl(fd, libc::F_OFD_GETLK, flock),
478-
#[cfg(any(target_os = "android", target_os = "linux"))]
478+
#[cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd"))]
479479
F_ADD_SEALS(flag) => libc::fcntl(fd, libc::F_ADD_SEALS, flag.bits()),
480-
#[cfg(any(target_os = "android", target_os = "linux"))]
480+
#[cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd"))]
481481
F_GET_SEALS => libc::fcntl(fd, libc::F_GET_SEALS),
482482
#[cfg(any(target_os = "macos", target_os = "ios"))]
483483
F_FULLFSYNC => libc::fcntl(fd, libc::F_FULLFSYNC),

0 commit comments

Comments
 (0)