diff --git a/CHANGELOG.md b/CHANGELOG.md index ca8040f..3b22de3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ - Add VxWorks support [#105](https://github.com/lambda-fairy/rust-errno/pull/105) +- Add cygwin support + [#106](https://github.com/lambda-fairy/rust-errno/pull/106) + # [0.3.10] - 2024-11-29 - Update to windows-sys 0.59 diff --git a/Cargo.toml b/Cargo.toml index bb9aed3..6bae929 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,3 +31,9 @@ libc = { version = "0.2", default-features = false } [features] default = ["std"] std = ["libc/std"] + +# TODO: Remove this exemption when Cygwin support lands in Rust stable +# https://github.com/rust-lang/rust/pull/134999 +[lints.rust.unexpected_cfgs] +level = "warn" +check-cfg = ['cfg(target_os, values("cygwin"))'] diff --git a/src/unix.rs b/src/unix.rs index 726748b..5536eef 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -78,6 +78,7 @@ extern "C" { target_os = "android", target_os = "espidf", target_os = "vxworks", + target_os = "cygwin", target_env = "newlib" ), link_name = "__errno"