Skip to content

Commit bc6cbc5

Browse files
committed
unistd: add sync() for cygwin
required by uutils-coreutils
1 parent 984420e commit bc6cbc5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/unistd.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,15 @@ pub fn chroot<P: ?Sized + NixPath>(path: &P) -> Result<()> {
16671667
/// Commit filesystem caches to disk
16681668
///
16691669
/// See also [sync(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/sync.html)
1670-
#[cfg(any(bsd, linux_android, solarish, target_os = "haiku", target_os = "aix", target_os = "hurd"))]
1670+
#[cfg(any(
1671+
bsd,
1672+
linux_android,
1673+
solarish,
1674+
target_os = "haiku",
1675+
target_os = "aix",
1676+
target_os = "hurd",
1677+
target_os = "cygwin"
1678+
))]
16711679
pub fn sync() {
16721680
unsafe { libc::sync() };
16731681
}

0 commit comments

Comments
 (0)