authorgravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2021-01-08 01:36:08+01:00
committergravatar for robin@voetter.nlRobin Voetter <robin@voetter.nl> 2021-01-08 02:34:42+01:00
logec7adeda2b06e6cc3a453b8e2487a5a3516ed488
tree3d413ff12bc3524598bf61e2ee22e474f903484f
parent83fad7d4f79314b14445542907a259ee1e57d10a

Add EPERM to std.os.setsockopt


1 files changed, 4 insertions(+), 0 deletions(-)

lib/std/os.zig+4
......@@ -5482,6 +5482,9 @@ pub const SetSockOptError = error{
54825482 /// Insufficient resources are available in the system to complete the call.
54835483 SystemResources,
54845484
5485 // Setting the socket option requires more elevated permissions.
5486 PermissionDenied,
5487
54855488 NetworkSubsystemFailed,
54865489 FileDescriptorNotASocket,
54875490 SocketNotBound,
......@@ -5514,6 +5517,7 @@ pub fn setsockopt(fd: socket_t, level: u32, optname: u32, opt: []const u8) SetSo
55145517 ENOPROTOOPT => return error.InvalidProtocolOption,
55155518 ENOMEM => return error.SystemResources,
55165519 ENOBUFS => return error.SystemResources,
5520 EPERM => return error.PermissionDenied,
55175521 else => |err| return unexpectedErrno(err),
55185522 }
55195523 }