diff options
Diffstat (limited to 'vendor/rustix/src/backend/libc/rand')
-rw-r--r-- | vendor/rustix/src/backend/libc/rand/syscalls.rs | 4 | ||||
-rw-r--r-- | vendor/rustix/src/backend/libc/rand/types.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vendor/rustix/src/backend/libc/rand/syscalls.rs b/vendor/rustix/src/backend/libc/rand/syscalls.rs index 1c4286235..ce1746055 100644 --- a/vendor/rustix/src/backend/libc/rand/syscalls.rs +++ b/vendor/rustix/src/backend/libc/rand/syscalls.rs @@ -1,9 +1,9 @@ //! libc syscalls supporting `rustix::rand`. -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "android", target_os = "linux"))] use {super::super::c, super::super::conv::ret_ssize_t, crate::io, crate::rand::GetRandomFlags}; -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "android", target_os = "linux"))] pub(crate) fn getrandom(buf: &mut [u8], flags: GetRandomFlags) -> io::Result<usize> { // `getrandom` wasn't supported in glibc until 2.25. weak_or_syscall! { diff --git a/vendor/rustix/src/backend/libc/rand/types.rs b/vendor/rustix/src/backend/libc/rand/types.rs index 2ba3f1119..e12bd9cbd 100644 --- a/vendor/rustix/src/backend/libc/rand/types.rs +++ b/vendor/rustix/src/backend/libc/rand/types.rs @@ -1,9 +1,9 @@ -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "android", target_os = "linux"))] use super::super::c; -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "android", target_os = "linux"))] use bitflags::bitflags; -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "android", target_os = "linux"))] bitflags! { /// `GRND_*` flags for use with [`getrandom`]. /// |