mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
std.c: android bionic C supports arc4random_buf and getentropy
1. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/bits/getentropy.h 2. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/stdlib.h
This commit is contained in:
parent
7d8a556ba9
commit
d67bf8bde3
@ -9331,9 +9331,11 @@ pub extern "c" fn setrlimit64(resource: rlimit_resource, rlim: *const rlimit) c_
|
||||
|
||||
pub const arc4random_buf = switch (native_os) {
|
||||
.dragonfly, .netbsd, .freebsd, .solaris, .openbsd, .macos, .ios, .tvos, .watchos, .visionos => private.arc4random_buf,
|
||||
.linux => if (builtin.abi.isAndroid()) private.arc4random_buf else {},
|
||||
else => {},
|
||||
};
|
||||
pub const getentropy = switch (native_os) {
|
||||
.linux => if (builtin.abi.isAndroid() and versionCheck(.{ .major = 28, .minor = 0, .patch = 0 })) private.getentropy else {},
|
||||
.emscripten => private.getentropy,
|
||||
else => {},
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user