Skip to content

Commit fd4a510

Browse files
committed
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
2 parents ae85db7 + ae6635f commit fd4a510

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/fcntl.rs

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ pub enum FcntlArg<'a> {
4646
F_ADD_SEALS(SealFlag),
4747
#[cfg(target_os = "linux")]
4848
F_GET_SEALS,
49+
#[cfg(any(target_os = "macos", target_os = "ios"))]
50+
F_FULLFSYNC,
4951

5052
// TODO: Rest of flags
5153
}
@@ -69,6 +71,8 @@ pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> {
6971
F_ADD_SEALS(flag) => libc::fcntl(fd, ffi::F_ADD_SEALS, flag.bits()),
7072
#[cfg(target_os = "linux")]
7173
F_GET_SEALS => libc::fcntl(fd, ffi::F_GET_SEALS),
74+
#[cfg(any(target_os = "macos", target_os = "ios"))]
75+
F_FULLFSYNC => libc::fcntl(fd, libc::F_FULLFSYNC),
7276
#[cfg(any(target_os = "linux", target_os = "android"))]
7377
_ => unimplemented!()
7478
}

0 commit comments

Comments
 (0)