We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 75ef735 + 8c0c7ec commit 9abf81aCopy full SHA for 9abf81a
library/std/src/sys/unix/fs.rs
@@ -787,11 +787,25 @@ impl File {
787
unsafe fn os_datasync(fd: c_int) -> c_int {
788
libc::fcntl(fd, libc::F_FULLFSYNC)
789
}
790
- #[cfg(target_os = "linux")]
+ #[cfg(any(
791
+ target_os = "freebsd",
792
+ target_os = "linux",
793
+ target_os = "android",
794
+ target_os = "netbsd",
795
+ target_os = "openbsd"
796
+ ))]
797
798
libc::fdatasync(fd)
799
- #[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "linux")))]
800
+ #[cfg(not(any(
801
802
803
+ target_os = "ios",
804
805
+ target_os = "macos",
806
807
808
+ )))]
809
810
libc::fsync(fd)
811
0 commit comments