Skip to content

Commit

Permalink
Support random file of AIX
Browse files Browse the repository at this point in the history
  • Loading branch information
ecnelises committed Oct 26, 2022
1 parent 8e44d13 commit 0a63f18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Expand Up @@ -209,7 +209,7 @@ pub use crate::error::Error;
// The function MUST NOT ever write uninitialized bytes into `dest`,
// regardless of what value it returns.
cfg_if! {
if #[cfg(any(target_os = "haiku", target_os = "redox"))] {
if #[cfg(any(target_os = "haiku", target_os = "redox", target_os = "aix"))] {
mod util_libc;
#[path = "use_file.rs"] mod imp;
} else if #[cfg(any(target_os = "android", target_os = "linux"))] {
Expand Down
1 change: 1 addition & 0 deletions src/use_file.rs
Expand Up @@ -25,6 +25,7 @@ use core::{
#[cfg(any(target_os = "solaris", target_os = "illumos"))]
const FILE_PATH: &str = "/dev/random\0";
#[cfg(any(
target_os = "aix",
target_os = "android",
target_os = "linux",
target_os = "redox",
Expand Down
2 changes: 2 additions & 0 deletions src/util_libc.rs
Expand Up @@ -32,6 +32,8 @@ cfg_if! {
fn __errno() -> *mut libc::c_int;
}
use __errno as errno_location;
} else if #[cfg(target_os = "aix")] {
use libc::_Errno as errno_location;
}
}

Expand Down

0 comments on commit 0a63f18

Please sign in to comment.