Skip to content

Commit 3a7afe4

Browse files
authored
Rollup merge of rust-lang#143776 - no1wudi:fix, r=tgross35
std: move NuttX to use arc4random for random number generation arc4random support in libc merged in rust-lang/libc#4464, so: * Move `target_os = "nuttx"` from unix_legacy to arc4random section * This aligns NuttX with other POSIX-compliant systems that support arc4random * Improves random number generation quality on NuttX by using the system's built-in arc4random implementation instead of legacy fallback methods NuttX supports arc4random_buf which provides better entropy and security compared to the legacy random number generation methods.
2 parents c374b03 + 0748462 commit 3a7afe4

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/sys/random

1 file changed

+1
-1
lines changed

library/std/src/sys/random/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ cfg_if::cfg_if! {
2020
target_os = "rtems",
2121
target_os = "solaris",
2222
target_os = "vita",
23+
target_os = "nuttx",
2324
))] {
2425
mod arc4random;
2526
pub use arc4random::fill_bytes;
@@ -44,7 +45,6 @@ cfg_if::cfg_if! {
4445
target_os = "hurd",
4546
target_os = "l4re",
4647
target_os = "nto",
47-
target_os = "nuttx",
4848
))] {
4949
mod unix_legacy;
5050
pub use unix_legacy::fill_bytes;

0 commit comments

Comments
 (0)