zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 744771d3303e122474a72c8a94b14fe1e9fb480c (tree)
parent 160445ef316f76dfddfa17b11c4919a3e14f486d
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue, 21 Jan 2025 00:10:05 -0500

Merge pull request #22536 from BryceVandegrift/access-er13

std.posix: Fix errno 13 when writing to file
Diffstat:
Mlib/std/posix.zig | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/std/posix.zig b/lib/std/posix.zig @@ -1169,8 +1169,7 @@ pub const WriteError = error{ DeviceBusy, InvalidArgument, - /// In WASI, this error may occur when the file descriptor does - /// not hold the required rights to write to it. + /// File descriptor does not hold the required rights to write to it. AccessDenied, BrokenPipe, SystemResources, @@ -1269,6 +1268,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize { .FBIG => return error.FileTooBig, .IO => return error.InputOutput, .NOSPC => return error.NoSpaceLeft, + .ACCES => return error.AccessDenied, .PERM => return error.AccessDenied, .PIPE => return error.BrokenPipe, .CONNRESET => return error.ConnectionResetByPeer,