9bf283c085
* getrandom libc prototypes had the wrong return type * `total_read` local variable was unnecessary since the sub-slice buffer has a length * I was able to get rid of all the integer casts * the err == 0 check can be a switch case * add missing `return` statement
10 lines
348 B
Zig
10 lines
348 B
Zig
const std = @import("../std.zig");
|
|
usingnamespace std.c;
|
|
|
|
extern "c" fn __error() *c_int;
|
|
pub const _errno = __error;
|
|
|
|
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;
|