Skip to content

Commit 9fd1bbc

Browse files
Add cygwin support (#106)
* Add cygwin support * Add build.rs to make CI happy * Use lints in Cargo.toml * Add TODO to remove the lint config later --------- Co-authored-by: Chris Wong <lambda.fairy@gmail.com>
1 parent b1ff60f commit 9fd1bbc

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
- Add VxWorks support
44
[#105](https://github.com/lambda-fairy/rust-errno/pull/105)
55

6+
- Add cygwin support
7+
[#106](https://github.com/lambda-fairy/rust-errno/pull/106)
8+
69
# [0.3.10] - 2024-11-29
710

811
- Update to windows-sys 0.59

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ libc = { version = "0.2", default-features = false }
3131
[features]
3232
default = ["std"]
3333
std = ["libc/std"]
34+
35+
# TODO: Remove this exemption when Cygwin support lands in Rust stable
36+
# https://github.com/rust-lang/rust/pull/134999
37+
[lints.rust.unexpected_cfgs]
38+
level = "warn"
39+
check-cfg = ['cfg(target_os, values("cygwin"))']

src/unix.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ extern "C" {
7878
target_os = "android",
7979
target_os = "espidf",
8080
target_os = "vxworks",
81+
target_os = "cygwin",
8182
target_env = "newlib"
8283
),
8384
link_name = "__errno"

0 commit comments

Comments
 (0)