Files
MSYS2-packages/uutils-coreutils/nix-add-sync.patch
2025-12-02 09:34:56 +03:00

20 lines
577 B
Diff

--- a/src/unistd.rs
+++ b/src/unistd.rs
@@ -1667,7 +1667,15 @@ pub fn chroot<P: ?Sized + NixPath>(path: &P) -> Result<()> {
/// Commit filesystem caches to disk
///
/// See also [sync(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/sync.html)
-#[cfg(any(bsd, linux_android, solarish, target_os = "haiku", target_os = "aix", target_os = "hurd"))]
+#[cfg(any(
+ bsd,
+ linux_android,
+ solarish,
+ target_os = "haiku",
+ target_os = "aix",
+ target_os = "hurd",
+ target_os = "cygwin"
+))]
pub fn sync() {
unsafe { libc::sync() };
}