summaryrefslogtreecommitdiff
path: root/src/unistd.rs
diff options
context:
space:
mode:
authorRyan Zoeller <rtzoeller@rtzoeller.com>2021-10-22 18:30:56 -0500
committerRyan Zoeller <rtzoeller@rtzoeller.com>2021-12-22 13:18:34 -0600
commit11494ecdadaf0a7936a14528f3b291292966b4ef (patch)
tree263336461c495b061993b8cbffd239286e24d498 /src/unistd.rs
parent78f2301a7404943eca69f024a9da775e2d5a44c5 (diff)
downloadnix-11494ecdadaf0a7936a14528f3b291292966b4ef.zip
Add fdatasync for missing platforms
Diffstat (limited to 'src/unistd.rs')
-rw-r--r--src/unistd.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/unistd.rs b/src/unistd.rs
index 0e7f94e0..01f35215 100644
--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -1323,11 +1323,13 @@ pub fn fsync(fd: RawFd) -> Result<()> {
///
/// See also
/// [fdatasync(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html)
-// `fdatasync(2) is in POSIX, but in libc it is only defined in `libc::notbsd`.
-// TODO: exclude only Apple systems after https://github.com/rust-lang/libc/pull/211
#[cfg(any(target_os = "linux",
target_os = "android",
target_os = "emscripten",
+ target_os = "freebsd",
+ target_os = "fuchsia",
+ target_os = "netbsd",
+ target_os = "openbsd",
target_os = "illumos",
target_os = "solaris"))]
#[inline]