Skip to content

Commit

Permalink
Disable "libc/std" in no-std configurations. (#77)
Browse files Browse the repository at this point in the history
Avoid enabling the "std" feature in libc if rust-errno's own "std"
feature is not enabled.
  • Loading branch information
sunfishcode committed Aug 27, 2023
1 parent 5675ef5 commit 6f49fcb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ categories = ["no-std", "os"]
rust-version = "1.48"

[target.'cfg(unix)'.dependencies]
libc = "0.2"
libc = { version = "0.2", default-features = false }

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.48"
Expand All @@ -26,11 +26,11 @@ features = [
errno-dragonfly = "0.1.2"

[target.'cfg(target_os="wasi")'.dependencies]
libc = "0.2"
libc = { version = "0.2", default-features = false }

[target.'cfg(target_os="hermit")'.dependencies]
libc = "0.2"
libc = { version = "0.2", default-features = false }

[features]
default = ["std"]
std = []
std = ["libc/std"]

0 comments on commit 6f49fcb

Please sign in to comment.