authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-10 01:42:40 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-10 01:42:40 -07:00
log065090fa8b3b1aaac21ff46756116713ff5a30dd
tree1a6446d9c1b7b638140c42fccf3c7acba3364f5a
parent72e93e558d6c120a7224e090547e70e96fe2c25a
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

add dup


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

mod.zig+6
......@@ -3758,3 +3758,9 @@ pub fn copy_file_range(fd_int: c_int, off_in: ?*off_t, fd_out: c_int, off_out: ?
37583758 std.debug.assert(rc >= 0);
37593759 return @intCast(rc);
37603760}
3761pub fn dup(fildes: c_int) !c_int {
3762 const rc = libc.dup(fildes);
3763 if (rc == -1) return errno.fromInt(errno.fromLibC());
3764 std.debug.assert(rc >= 0);
3765 return rc;
3766}
test.zig+1
......@@ -83,4 +83,5 @@ test {
8383 _ = &linux.getcwd;
8484 _ = &linux.fchmod;
8585 _ = &linux.copy_file_range;
86 _ = &linux.dup;
8687}