Skip to content

Commit 945f539

Browse files
Add Apache NuttX support
1 parent dd86155 commit 945f539

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,39 +42,39 @@ rand_core = { version = "0.10.0", optional = true }
4242

4343
# getrandom / linux_android_with_fallback
4444
[target.'cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr"))))'.dependencies]
45-
libc = { version = "0.2.154", default-features = false }
45+
libc = { version = "0.2.176", default-features = false }
4646

4747
# apple-other
4848
[target.'cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos"))'.dependencies]
49-
libc = { version = "0.2.154", default-features = false }
49+
libc = { version = "0.2.176", default-features = false }
5050

5151
# efi_rng
5252
[target.'cfg(all(target_os = "uefi", getrandom_backend = "efi_rng"))'.dependencies]
5353
r-efi = { version = "6", default-features = false }
5454

5555
# getentropy
5656
[target.'cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten"))'.dependencies]
57-
libc = { version = "0.2.154", default-features = false }
57+
libc = { version = "0.2.176", default-features = false }
5858

5959
# getrandom
60-
[target.'cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", all(target_os = "horizon", target_arch = "arm")))'.dependencies]
61-
libc = { version = "0.2.154", default-features = false }
60+
[target.'cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", target_os = "nuttx", all(target_os = "horizon", target_arch = "arm")))'.dependencies]
61+
libc = { version = "0.2.176", default-features = false }
6262

6363
# netbsd
6464
[target.'cfg(target_os = "netbsd")'.dependencies]
65-
libc = { version = "0.2.154", default-features = false }
65+
libc = { version = "0.2.176", default-features = false }
6666

6767
# solaris
6868
[target.'cfg(target_os = "solaris")'.dependencies]
69-
libc = { version = "0.2.154", default-features = false }
69+
libc = { version = "0.2.176", default-features = false }
7070

7171
# use_file
7272
[target.'cfg(any(target_os = "haiku", target_os = "redox", target_os = "nto", target_os = "aix"))'.dependencies]
73-
libc = { version = "0.2.154", default-features = false }
73+
libc = { version = "0.2.176", default-features = false }
7474

7575
# vxworks
7676
[target.'cfg(target_os = "vxworks")'.dependencies]
77-
libc = { version = "0.2.154", default-features = false }
77+
libc = { version = "0.2.176", default-features = false }
7878

7979
# wasm_js
8080
[target.'cfg(all(target_family = "wasm", any(target_os = "unknown", target_os = "none")))'.dependencies]

src/backends.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ cfg_if! {
113113
target_os = "hurd",
114114
target_os = "illumos",
115115
target_os = "cygwin",
116+
target_os = "nuttx",
116117
// Check for target_arch = "arm" to only include the 3DS. Does not
117118
// include the Nintendo Switch (which is target_arch = "aarch64").
118119
all(target_os = "horizon", target_arch = "arm"),

src/utils/get_errno.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cfg_if! {
2-
if #[cfg(any(target_os = "netbsd", target_os = "openbsd", target_os = "android", target_os = "cygwin"))] {
2+
if #[cfg(any(target_os = "netbsd", target_os = "openbsd", target_os = "android", target_os = "cygwin", target_os = "nuttx"))] {
33
use libc::__errno as errno_location;
44
} else if #[cfg(any(target_os = "linux", target_os = "emscripten", target_os = "hurd", target_os = "redox", target_os = "dragonfly"))] {
55
use libc::__errno_location as errno_location;

0 commit comments

Comments
 (0)