authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-30 03:34:43 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-30 03:34:43 -07:00
logc8ef1a85dfb5e1891454650f88d56bfaa0834304
treeb26a6eace4ec545b0670410c2075dfa914c87a2b
parent3265d1f06418eb0360d753c12116310a14b97bde
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

add faccessat


1 files changed, 6 insertions(+), 0 deletions(-)

sys_darwin.zig+6
......@@ -280,6 +280,7 @@ pub const libc = struct {
280280 pub extern fn lseek(fd: c_int, offset: off_t, whence: c_int) off_t;
281281 pub extern fn getcwd(buf: [*]u8, size: usize) ?[*:0]u8;
282282 pub extern fn fchmod(fildes: c_int, mode: mode_t) c_int;
283 pub extern fn faccessat(fd: c_int, path: [*:0]const u8, amode: c_int, flag: c_int) c_int;
283284};
284285
285286pub const natural_t = c_uint;
......@@ -569,3 +570,8 @@ pub fn fchmod(fd: c_int, mode: mode_t) !void {
569570 if (rc == -1) return errno.fromInt(errno.fromLibC());
570571 std.debug.assert(rc == 0);
571572}
573pub fn faccessat(fd: c_int, path: [*:0]const u8, amode: c_int, flag: c_int) !void {
574 const rc = libc.faccessat(fd, path, amode, flag);
575 if (rc == -1) return errno.fromInt(errno.fromLibC());
576 std.debug.assert(rc == 0);
577}