authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-25 21:13:06 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-25 21:13:06 -07:00
loga6446c21167ef9dce941ce2ea0aa673880b93358
treeaffd3399371e8e926df40408e16ef493df4ef4cb
parent602bb5704999acd385f39f2dd9cd2b9afa1480df
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

add openat4


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

mod.zig+5
......@@ -3117,6 +3117,11 @@ pub fn openat(fd: c_int, file: [*:0]const u8, oflag: c_int) errno.Error!c_int {
31173117 if (rc == -1) return errno.fromInt(errno.fromLibC());
31183118 return rc;
31193119}
3120pub fn openat4(fd: c_int, file: [*:0]const u8, oflag: c_int, mode: mode_t) errno.Error!c_int {
3121 const rc = libc.openat(fd, file, oflag, mode);
3122 if (rc == -1) return errno.fromInt(errno.fromLibC());
3123 return rc;
3124}
31203125pub fn close(fd: c_int) errno.Error!void {
31213126 const rc = libc.close(fd);
31223127 if (rc == -1) return errno.fromInt(errno.fromLibC());
test.zig+1
......@@ -38,4 +38,5 @@ test {
3838 _ = &linux.renameat;
3939 _ = &linux.mmap;
4040 _ = &linux.munmap;
41 _ = &linux.openat4;
4142}