| author | |
| committer | |
| log | 065090fa8b3b1aaac21ff46756116713ff5a30dd |
| tree | 1a6446d9c1b7b638140c42fccf3c7acba3364f5a |
| parent | 72e93e558d6c120a7224e090547e70e96fe2c25a |
| signature |
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: ? |
| 3758 | 3758 | std.debug.assert(rc >= 0); |
| 3759 | 3759 | return @intCast(rc); |
| 3760 | 3760 | } |
| 3761 | pub 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 { |
| 83 | 83 | _ = &linux.getcwd; |
| 84 | 84 | _ = &linux.fchmod; |
| 85 | 85 | _ = &linux.copy_file_range; |
| 86 | _ = &linux.dup; | |
| 86 | 87 | } |