diff options
author | Homu <homu@barosl.com> | 2016-08-27 04:38:23 +0900 |
---|---|---|
committer | Homu <homu@barosl.com> | 2016-08-27 04:38:23 +0900 |
commit | fd4a5106354bdcdbda6cf93395cdee6c17e5b7ee (patch) | |
tree | f95f98ef851014c15fda384de72531f648c02877 /src/fcntl.rs | |
parent | ae85db73727b13b8fcafe335c33eee75a2082f5a (diff) | |
parent | ae6635f7a6b0a941e05c2d4e4fc2a485df282034 (diff) | |
download | nix-fd4a5106354bdcdbda6cf93395cdee6c17e5b7ee.zip |
Auto merge of #407 - untitaker:fullfsync-fcntl, r=fiveop
Add FcntlArg::F_FULLFSYNC
https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html
Diffstat (limited to 'src/fcntl.rs')
-rw-r--r-- | src/fcntl.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fcntl.rs b/src/fcntl.rs index 75e12549..1d9ba499 100644 --- a/src/fcntl.rs +++ b/src/fcntl.rs @@ -46,6 +46,8 @@ pub enum FcntlArg<'a> { F_ADD_SEALS(SealFlag), #[cfg(target_os = "linux")] F_GET_SEALS, + #[cfg(any(target_os = "macos", target_os = "ios"))] + F_FULLFSYNC, // TODO: Rest of flags } @@ -69,6 +71,8 @@ pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> { F_ADD_SEALS(flag) => libc::fcntl(fd, ffi::F_ADD_SEALS, flag.bits()), #[cfg(target_os = "linux")] F_GET_SEALS => libc::fcntl(fd, ffi::F_GET_SEALS), + #[cfg(any(target_os = "macos", target_os = "ios"))] + F_FULLFSYNC => libc::fcntl(fd, libc::F_FULLFSYNC), #[cfg(any(target_os = "linux", target_os = "android"))] _ => unimplemented!() } |