File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ pub use crate::error::Error;
188
188
// These should all provide getrandom_inner with the same signature as getrandom.
189
189
cfg_if ! {
190
190
if #[ cfg( any( target_os = "emscripten" , target_os = "haiku" ,
191
- target_os = "redox" ) ) ] {
191
+ target_os = "redox" , target_os = "aix" ) ) ] {
192
192
mod util_libc;
193
193
#[ path = "use_file.rs" ] mod imp;
194
194
} else if #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ] {
Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ use core::{
26
26
target_os = "illumos"
27
27
) ) ]
28
28
const FILE_PATH : & str = "/dev/random\0 " ;
29
- #[ cfg( any( target_os = "android" , target_os = "linux" , target_os = "redox" ) ) ]
29
+ #[ cfg( any( target_os = "android" , target_os = "linux" ,
30
+ target_os = "redox" , target_os = "aix" ) ) ]
30
31
const FILE_PATH : & str = "/dev/urandom\0 " ;
31
32
32
33
pub fn getrandom_inner ( dest : & mut [ u8 ] ) -> Result < ( ) , Error > {
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ cfg_if! {
31
31
fn __errno( ) -> * mut libc:: c_int;
32
32
}
33
33
use __errno as errno_location;
34
+ } else if #[ cfg( target_os = "aix" ) ] {
35
+ use libc:: _Errno as errno_location;
34
36
}
35
37
}
36
38
You can’t perform that action at this time.
0 commit comments