Skip to content

Commit

Permalink
Add fdatasync for missing platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
rtzoeller committed Oct 22, 2021
1 parent 3429165 commit c4347c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/unistd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1281,11 +1281,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]
Expand Down

0 comments on commit c4347c9

Please sign in to comment.