about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHenry Jiang <henry.jiang1@ibm.com>2024-10-22 20:18:11 -0400
committerHenry Jiang <henry.jiang1@ibm.com>2024-10-22 20:18:11 -0400
commit8ca39104f1af6871ccc6119ddfda37aa76f628fb (patch)
tree81c24df27769553a53ed52a2db89f488b6a39733
parent86d69c705a552236a622eee3fdea94bf13c5f102 (diff)
downloadrust-8ca39104f1af6871ccc6119ddfda37aa76f628fb.tar.gz
rust-8ca39104f1af6871ccc6119ddfda37aa76f628fb.zip
AIX use /dev/urandom for impl
-rw-r--r--library/std/src/random.rs2
-rw-r--r--library/std/src/sys/random/mod.rs1
2 files changed, 2 insertions, 1 deletions
diff --git a/library/std/src/random.rs b/library/std/src/random.rs
index cdb88c795bf..45f51dd37b0 100644
--- a/library/std/src/random.rs
+++ b/library/std/src/random.rs
@@ -38,7 +38,7 @@ use crate::sys::random as sys;
 /// Vita                   | `arc4random_buf`
 /// Hermit                 | `read_entropy`
 /// Horizon                | `getrandom` shim
-/// Hurd, L4Re, QNX        | `/dev/urandom`
+/// AIX, Hurd, L4Re, QNX   | `/dev/urandom`
 /// Redox                  | `/scheme/rand`
 /// RTEMS                  | [`arc4random_buf`](https://docs.rtems.org/branches/master/bsp-howto/getentropy.html)
 /// SGX                    | [`rdrand`](https://en.wikipedia.org/wiki/RDRAND)
diff --git a/library/std/src/sys/random/mod.rs b/library/std/src/sys/random/mod.rs
index edc2cacdfd8..f42351deb92 100644
--- a/library/std/src/sys/random/mod.rs
+++ b/library/std/src/sys/random/mod.rs
@@ -40,6 +40,7 @@ cfg_if::cfg_if! {
         mod horizon;
         pub use horizon::fill_bytes;
     } else if #[cfg(any(
+        target_os = "aix",
         target_os = "hurd",
         target_os = "l4re",
         target_os = "nto",