Skip to content

Commit 0a63f18

Browse files
committed
Support random file of AIX
1 parent 8e44d13 commit 0a63f18

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ pub use crate::error::Error;
209209
// The function MUST NOT ever write uninitialized bytes into `dest`,
210210
// regardless of what value it returns.
211211
cfg_if! {
212-
if #[cfg(any(target_os = "haiku", target_os = "redox"))] {
212+
if #[cfg(any(target_os = "haiku", target_os = "redox", target_os = "aix"))] {
213213
mod util_libc;
214214
#[path = "use_file.rs"] mod imp;
215215
} else if #[cfg(any(target_os = "android", target_os = "linux"))] {

src/use_file.rs

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ use core::{
2525
#[cfg(any(target_os = "solaris", target_os = "illumos"))]
2626
const FILE_PATH: &str = "/dev/random\0";
2727
#[cfg(any(
28+
target_os = "aix",
2829
target_os = "android",
2930
target_os = "linux",
3031
target_os = "redox",

src/util_libc.rs

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ cfg_if! {
3232
fn __errno() -> *mut libc::c_int;
3333
}
3434
use __errno as errno_location;
35+
} else if #[cfg(target_os = "aix")] {
36+
use libc::_Errno as errno_location;
3537
}
3638
}
3739

0 commit comments

Comments
 (0)