Skip to content

Commit 919a91f

Browse files
authored
Check EPERM only on Linux
1 parent 94e6986 commit 919a91f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/linux_android_with_fallback.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ fn is_getrandom_available() -> bool {
2020
if getrandom_syscall(&[]) < 0 {
2121
match last_os_error().raw_os_error() {
2222
Some(libc::ENOSYS) => false, // No kernel support
23+
#[cfg(target_os = "linux")]
2324
Some(libc::EPERM) => false, // Blocked by seccomp
2425
_ => true,
2526
}

0 commit comments

Comments
 (0)