We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7820135 commit 8c0c7ecCopy full SHA for 8c0c7ec
library/std/src/sys/unix/fs.rs
@@ -752,11 +752,25 @@ impl File {
752
unsafe fn os_datasync(fd: c_int) -> c_int {
753
libc::fcntl(fd, libc::F_FULLFSYNC)
754
}
755
- #[cfg(target_os = "linux")]
+ #[cfg(any(
756
+ target_os = "freebsd",
757
+ target_os = "linux",
758
+ target_os = "android",
759
+ target_os = "netbsd",
760
+ target_os = "openbsd"
761
+ ))]
762
763
libc::fdatasync(fd)
764
- #[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "linux")))]
765
+ #[cfg(not(any(
766
767
768
+ target_os = "ios",
769
770
+ target_os = "macos",
771
772
773
+ )))]
774
775
libc::fsync(fd)
776
0 commit comments