mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 22:04:21 +00:00
dragonfly: add std.c.arc4random_buf
This allows for a more optimal std.crypto.tlcsprng codepath. Without it a an "incorrect alignment" panic is triggered from crypto.tlcsprng which aligns a threadlocal but it's actually not aligned, thus detected by the safety check. It appears that LLVM-IR does attribute the storage with alignment but it is ultimately not respected in the final binary for netbsd and dragonfly.
This commit is contained in:
parent
ef08894d37
commit
69553d60da
1 changed files with 1 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) usize;
|
|||
pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int;
|
||||
pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize;
|
||||
pub extern "c" fn pipe2(fds: *[2]fd_t, flags: u32) c_int;
|
||||
pub extern "c" fn arc4random_buf(buf: [*]u8, len: usize) void;
|
||||
|
||||
pub const dl_iterate_phdr_callback = *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int;
|
||||
pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue