We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ea6256 commit bc6a5c7Copy full SHA for bc6a5c7
library/std/src/sys/unix/rand.rs
@@ -64,17 +64,7 @@ mod imp {
64
65
#[cfg(any(target_os = "espidf", target_os = "horizon", target_os = "freebsd"))]
66
fn getrandom(buf: &mut [u8]) -> libc::ssize_t {
67
- #[cfg(not(target_os = "freebsd"))]
68
- use libc::getrandom;
69
- #[cfg(target_os = "freebsd")]
70
- extern "C" {
71
- fn getrandom(
72
- buf: *mut libc::c_void,
73
- buflen: libc::size_t,
74
- flags: libc::c_uint,
75
- ) -> libc::ssize_t;
76
- }
77
- unsafe { getrandom(buf.as_mut_ptr().cast(), buf.len(), 0) }
+ unsafe { libc::getrandom(buf.as_mut_ptr().cast(), buf.len(), 0) }
78
}
79
80
#[cfg(not(any(
0 commit comments