Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.4.4] - UNRELEASED
### Added
- Apache NuttX support ([#861])
- Support for `target_os = "qnx"` via the `use_file` backend ([#884])

### Fixed
- Deprecation warning for `libc::INT_MAX` [#868]
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ libc = { version = "0.2.176", default-features = false }
libc = { version = "0.2.190", default-features = false }

# use_file
[target.'cfg(any(target_os = "haiku", target_os = "nto", target_os = "aix"))'.dependencies]
[target.'cfg(any(target_os = "haiku", target_os = "nto", target_os = "aix", target_os = "qnx"))'.dependencies]
libc = { version = "0.2.176", default-features = false }

# vxworks
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ fn get_random_u128() -> Result<u128, getrandom::Error> {
| ESP-IDF | `*‑espidf` | [`esp_fill_random`] WARNING: see "Early Boot" section below
| PS Vita | `*-vita-*` | [`getentropy`][19]
| QNX Neutrino | `*‑nto-qnx*` | [`/dev/urandom`][14] (identical to `/dev/random`)
| QNX SDP 8.0 | `*-qnx` | [`/dev/urandom`][21] (identical to `/dev/random`)
| AIX | `*-ibm-aix` | [`/dev/urandom`][15]
| Cygwin | `*-cygwin` | [`getrandom`][20] (based on [`RtlGenRandom`])
| Motor OS | `x86_64-unknown-motor` | [`RDRAND`]
Expand Down Expand Up @@ -374,6 +375,7 @@ dual licensed as above, without any additional terms or conditions.
[18]: https://github.com/rust3ds/shim-3ds/commit/b01d2568836dea2a65d05d662f8e5f805c64389d
[19]: https://github.com/vitasdk/newlib/blob/2d869fe47aaf02b8e52d04e9a2b79d5b210fd016/newlib/libc/sys/vita/getentropy.c
[20]: https://github.com/cygwin/cygwin/blob/main/winsup/cygwin/libc/getentropy.cc
[21]: https://www.qnx.com/developers/docs/8.0/com.qnx.doc.security.system/topic/manual/dev_random.html

[`ProcessPrng`]: https://learn.microsoft.com/en-us/windows/win32/seccng/processprng
[`RtlGenRandom`]: https://learn.microsoft.com/en-us/windows/win32/api/ntsecapi/nf-ntsecapi-rtlgenrandom
Expand Down
1 change: 1 addition & 0 deletions src/backends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ cfg_if! {
target_os = "haiku",
target_os = "nto",
target_os = "aix",
target_os = "qnx",
))] {
mod use_file;
pub use use_file::*;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/get_errno.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cfg_if! {
use libc::__error as errno_location;
} else if #[cfg(target_os = "haiku")] {
use libc::_errnop as errno_location;
} else if #[cfg(target_os = "nto")] {
} else if #[cfg(any(target_os = "nto", target_os = "qnx"))] {
use libc::__get_errno_ptr as errno_location;
} else if #[cfg(any(all(target_os = "horizon", target_arch = "arm"), target_os = "vita"))] {
unsafe extern "C" {
Expand Down
Loading