Rollup merge of #131774 - thesummer:rtems-add-getentropy, r=joboet · qinheping/verify-rust-std@fe19eb6 (original) (raw)
3 files changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -40,6 +40,7 @@ use crate::sys::random as sys; | ||
| 40 | 40 | /// Horizon | `getrandom` shim |
| 41 | 41 | /// Hurd, L4Re, QNX | `/dev/urandom` |
| 42 | 42 | /// Redox | `/scheme/rand` |
| 43 | +/// RTEMS | [`arc4random_buf`](https://docs.rtems.org/branches/master/bsp-howto/getentropy.html) | |
| 43 | 44 | /// SGX | [`rdrand`](https://en.wikipedia.org/wiki/RDRAND) |
| 44 | 45 | /// SOLID | `SOLID_RNG_SampleRandomBytes` |
| 45 | 46 | /// TEEOS | `TEE_GenerateRandom` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -12,6 +12,7 @@ | ||
| 12 | 12 | #[cfg(not(any( |
| 13 | 13 | target_os = "haiku", |
| 14 | 14 | target_os = "illumos", |
| 15 | + target_os = "rtems", | |
| 15 | 16 | target_os = "solaris", |
| 16 | 17 | target_os = "vita", |
| 17 | 18 | )))] |
| @@ -21,6 +22,7 @@ use libc::arc4random_buf; | ||
| 21 | 22 | #[cfg(any( |
| 22 | 23 | target_os = "haiku", // See https://git.haiku-os.org/haiku/tree/headers/compatibility/bsd/stdlib.h |
| 23 | 24 | target_os = "illumos", // See https://www.illumos.org/man/3C/arc4random |
| 25 | + target_os = "rtems", // See https://docs.rtems.org/branches/master/bsp-howto/getentropy.html | |
| 24 | 26 | target_os = "solaris", // See https://docs.oracle.com/cd/E88353\_01/html/E37843/arc4random-3c.html |
| 25 | 27 | target_os = "vita", // See https://github.com/vitasdk/newlib/blob/b89e5bc183b516945f9ee07eef483ecb916e45ff/newlib/libc/include/stdlib.h#L74 |
| 26 | 28 | ))] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -17,6 +17,7 @@ cfg_if::cfg_if! { | ||
| 17 | 17 | target_os = "illumos", |
| 18 | 18 | target_os = "netbsd", |
| 19 | 19 | target_os = "openbsd", |
| 20 | + target_os = "rtems", | |
| 20 | 21 | target_os = "solaris", |
| 21 | 22 | target_os = "vita", |
| 22 | 23 | ))] { |