| ... | @@ -2751,6 +2751,10 @@ pub const libc = struct { | ... | @@ -2751,6 +2751,10 @@ pub const libc = struct { |
| 2751 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/umask.html | 2751 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/umask.html |
| 2752 | pub extern fn umask(cmask: mode_t) mode_t; | 2752 | pub extern fn umask(cmask: mode_t) mode_t; |
| 2753 | | 2753 | |
| | 2754 | /// int unlinkat(int fd, const char *path, int flag); |
| | 2755 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/unlinkat.html |
| | 2756 | pub extern fn unlinkat(fd: c_int, name: [*:0]const u8, flag: c_int) c_int; |
| | 2757 | |
| 2754 | /// int unlockpt(int fildes); | 2758 | /// int unlockpt(int fildes); |
| 2755 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/unlockpt.html | 2759 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/unlockpt.html |
| 2756 | pub extern fn unlockpt(fd: c_int) c_int; | 2760 | pub extern fn unlockpt(fd: c_int) c_int; |
| ... | @@ -3691,3 +3695,8 @@ pub fn waitpid(pid: pid_t, options: c_int) !struct { pid_t, c_int } { | ... | @@ -3691,3 +3695,8 @@ pub fn waitpid(pid: pid_t, options: c_int) !struct { pid_t, c_int } { |
| 3691 | std.debug.assert(rc >= 0); | 3695 | std.debug.assert(rc >= 0); |
| 3692 | return .{ rc, status }; | 3696 | return .{ rc, status }; |
| 3693 | } | 3697 | } |
| | 3698 | pub fn unlinkat(fd: c_int, name: [*:0]const u8, flag: c_int) !void { |
| | 3699 | const rc = libc.unlinkat(fd, name, flag); |
| | 3700 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| | 3701 | std.debug.assert(rc == 0); |
| | 3702 | } |