From 11494ecdadaf0a7936a14528f3b291292966b4ef Mon Sep 17 00:00:00 2001 From: Ryan Zoeller Date: Fri, 22 Oct 2021 18:30:56 -0500 Subject: Add fdatasync for missing platforms --- src/unistd.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/unistd.rs') 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] -- cgit v1.2.3