diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8fbe613d..37c40cb2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,6 +86,7 @@ jobs: target: [ aarch64-kmc-solid_asp3, aarch64-unknown-nto-qnx710, + aarch64-unknown-nuttx, armv6k-nintendo-3ds, armv7-sony-vita-newlibeabihf, i686-unknown-hurd-gnu, diff --git a/CHANGELOG.md b/CHANGELOG.md index 000d9493..7d550305 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.4.4] - UNRELEASED +### Added +- Apache NuttX support ([#861]) + +[0.4.4]: https://github.com/rust-random/getrandom/compare/v0.4.3...master +[#861]: https://github.com/rust-random/getrandom/pull/861 + ## [0.4.3] - 2026-06-17 ### Added - `wasm64-unknown-unknown` target support for `wasm_js` backend [#848] diff --git a/Cargo.toml b/Cargo.toml index 0e488c4d..05740be1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,11 +42,11 @@ rand_core = { version = "0.10.0", optional = true } # getrandom / linux_android_with_fallback [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] -libc = { version = "0.2.154", default-features = false } +libc = { version = "0.2.176", default-features = false } # apple-other [target.'cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos"))'.dependencies] -libc = { version = "0.2.154", default-features = false } +libc = { version = "0.2.176", default-features = false } # efi_rng [target.'cfg(all(target_os = "uefi", getrandom_backend = "efi_rng"))'.dependencies] @@ -54,27 +54,27 @@ r-efi = { version = "6", default-features = false } # getentropy [target.'cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten"))'.dependencies] -libc = { version = "0.2.154", default-features = false } +libc = { version = "0.2.176", default-features = false } # getrandom -[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] -libc = { version = "0.2.154", default-features = false } +[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] +libc = { version = "0.2.176", default-features = false } # netbsd [target.'cfg(target_os = "netbsd")'.dependencies] -libc = { version = "0.2.154", default-features = false } +libc = { version = "0.2.176", default-features = false } # solaris [target.'cfg(target_os = "solaris")'.dependencies] -libc = { version = "0.2.154", default-features = false } +libc = { version = "0.2.176", default-features = false } # use_file [target.'cfg(any(target_os = "haiku", target_os = "redox", target_os = "nto", target_os = "aix"))'.dependencies] -libc = { version = "0.2.154", default-features = false } +libc = { version = "0.2.176", default-features = false } # vxworks [target.'cfg(target_os = "vxworks")'.dependencies] -libc = { version = "0.2.154", default-features = false } +libc = { version = "0.2.176", default-features = false } # wasm_js [target.'cfg(all(target_family = "wasm", any(target_os = "unknown", target_os = "none")))'.dependencies] diff --git a/src/backends.rs b/src/backends.rs index 86ffd757..ef40894d 100644 --- a/src/backends.rs +++ b/src/backends.rs @@ -113,6 +113,7 @@ cfg_if! { target_os = "hurd", target_os = "illumos", target_os = "cygwin", + target_os = "nuttx", // Check for target_arch = "arm" to only include the 3DS. Does not // include the Nintendo Switch (which is target_arch = "aarch64"). all(target_os = "horizon", target_arch = "arm"), diff --git a/src/utils/get_errno.rs b/src/utils/get_errno.rs index 1895fc05..2c68ef9e 100644 --- a/src/utils/get_errno.rs +++ b/src/utils/get_errno.rs @@ -1,5 +1,5 @@ cfg_if! { - if #[cfg(any(target_os = "netbsd", target_os = "openbsd", target_os = "android", target_os = "cygwin"))] { + if #[cfg(any(target_os = "netbsd", target_os = "openbsd", target_os = "android", target_os = "cygwin", target_os = "nuttx"))] { use libc::__errno as errno_location; } else if #[cfg(any(target_os = "linux", target_os = "emscripten", target_os = "hurd", target_os = "redox", target_os = "dragonfly"))] { use libc::__errno_location as errno_location;