Skip to content

Commit 975111f

Browse files
authored
feat: add cygwin support (#2610)
* feat: add cygwin support * Remove no_mangle * Add check-cfg for cygwin target * feat: full cygwin support * feat: update libc to add cygwin support * feat: add statfs support for cygwin * fix: some tests for cygwin * fix: ignore failed tests on cygwin * Format code * fix: mark from_i32 pub(crate) * test: restore symlink tests on cygwin * test: test user passwd on cygwin * test: restore more tests on cygwin They pass on Cygwin, but not on MSYS2 as intended.
1 parent cc6b161 commit 975111f

27 files changed

+482
-72
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ targets = [
2828
]
2929

3030
[dependencies]
31-
libc = { version = "0.2.166", features = ["extra_traits"] }
31+
libc = { version = "0.2.171", features = ["extra_traits"] }
3232
bitflags = "2.3.3"
3333
cfg-if = "1.0"
3434
pin-utils = { version = "0.1.0", optional = true }

build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ fn main() {
3030
// Below are custom cfg values set during some CI steps.
3131
println!("cargo:rustc-check-cfg=cfg(fbsd14)");
3232
println!("cargo:rustc-check-cfg=cfg(qemu)");
33+
// Cygwin target, added in 1.86
34+
println!("cargo:rustc-check-cfg=cfg(target_os, values(\"cygwin\"))");
3335
}

src/dir.rs

+1
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ impl Entry {
287287
target_os = "fuchsia",
288288
target_os = "haiku",
289289
target_os = "hurd",
290+
target_os = "cygwin",
290291
solarish,
291292
linux_android,
292293
apple_targets))] {

0 commit comments

Comments
 (0)