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;
188188// These should all provide getrandom_inner with the same signature as getrandom.
189189cfg_if ! {
190190 if #[ cfg( any( target_os = "emscripten" , target_os = "haiku" ,
191- target_os = "redox" ) ) ] {
191+ target_os = "redox" , target_os = "aix" ) ) ] {
192192 mod util_libc;
193193 #[ path = "use_file.rs" ] mod imp;
194194 } 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::{
2626 target_os = "illumos"
2727) ) ]
2828const 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" ) ) ]
3031const FILE_PATH : & str = "/dev/urandom\0 " ;
3132
3233pub fn getrandom_inner ( dest : & mut [ u8 ] ) -> Result < ( ) , Error > {
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ cfg_if! {
3131 fn __errno( ) -> * mut libc:: c_int;
3232 }
3333 use __errno as errno_location;
34+ } else if #[ cfg( target_os = "aix" ) ] {
35+ use libc:: _Errno as errno_location;
3436 }
3537}
3638
You can’t perform that action at this time.
0 commit comments