about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unix/rand.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-11 06:26:35 +0000
committerbors <bors@rust-lang.org>2024-05-11 06:26:35 +0000
commitbe7549f82c194c7a5dc8f34ed0541bfebbaf33ea (patch)
tree743e53d481c65cd46cdbe65c2251cd8c3372fc43 /library/std/src/sys/pal/unix/rand.rs
parentef15976387ad9c1cdceaabf469e0cf35f5852f6d (diff)
parenta4317c4eecc996e3afb98923293b90bf7e34575a (diff)
downloadrust-be7549f82c194c7a5dc8f34ed0541bfebbaf33ea.tar.gz
rust-be7549f82c194c7a5dc8f34ed0541bfebbaf33ea.zip
Auto merge of #125000 - matthiaskrgr:rollup-cc9lc2y, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #124766 (std::rand: adding solaris/illumos for getrandom support.)
 - #124818 (Update ena to 0.14.3)
 - #124991 (Fix typo in ManuallyDrop's documentation)
 - #124994 (Add `@saethlin` to some triagebot groups)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys/pal/unix/rand.rs')
-rw-r--r--library/std/src/sys/pal/unix/rand.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/unix/rand.rs b/library/std/src/sys/pal/unix/rand.rs
index d8f227b4ef4..e6df109a6b8 100644
--- a/library/std/src/sys/pal/unix/rand.rs
+++ b/library/std/src/sys/pal/unix/rand.rs
@@ -59,7 +59,14 @@ mod imp {
         unsafe { getrandom(buf.as_mut_ptr().cast(), buf.len(), libc::GRND_NONBLOCK) }
     }
 
-    #[cfg(any(target_os = "espidf", target_os = "horizon", target_os = "freebsd", netbsd10))]
+    #[cfg(any(
+        target_os = "espidf",
+        target_os = "horizon",
+        target_os = "freebsd",
+        netbsd10,
+        target_os = "illumos",
+        target_os = "solaris"
+    ))]
     fn getrandom(buf: &mut [u8]) -> libc::ssize_t {
         unsafe { libc::getrandom(buf.as_mut_ptr().cast(), buf.len(), 0) }
     }
@@ -83,6 +90,8 @@ mod imp {
         target_os = "horizon",
         target_os = "freebsd",
         target_os = "dragonfly",
+        target_os = "solaris",
+        target_os = "illumos",
         netbsd10
     )))]
     fn getrandom_fill_bytes(_buf: &mut [u8]) -> bool {
@@ -96,6 +105,8 @@ mod imp {
         target_os = "horizon",
         target_os = "freebsd",
         target_os = "dragonfly",
+        target_os = "solaris",
+        target_os = "illumos",
         netbsd10
     ))]
     fn getrandom_fill_bytes(v: &mut [u8]) -> bool {