Skip to content

Commit 71f6ee9

Browse files
ognevnySteveLauC
andauthored
unistd: add sync() for cygwin (#2708)
* unistd: add sync() for cygwin required by uutils-coreutils * changelog --------- Co-authored-by: Steve Lau <[email protected]>
1 parent 984420e commit 71f6ee9

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

changelog/2708.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
add sync() for cygwin

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)