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{...@@ -5482,6 +5482,9 @@ pub const SetSockOptError = error{
5482 /// Insufficient resources are available in the system to complete the call.5482 /// Insufficient resources are available in the system to complete the call.
5483 SystemResources,5483 SystemResources,
54845484
5485 // Setting the socket option requires more elevated permissions.
5486 PermissionDenied,
5487
5485 NetworkSubsystemFailed,5488 NetworkSubsystemFailed,
5486 FileDescriptorNotASocket,5489 FileDescriptorNotASocket,
5487 SocketNotBound,5490 SocketNotBound,
...@@ -5514,6 +5517,7 @@ pub fn setsockopt(fd: socket_t, level: u32, optname: u32, opt: []const u8) SetSo...@@ -5514,6 +5517,7 @@ pub fn setsockopt(fd: socket_t, level: u32, optname: u32, opt: []const u8) SetSo
5514 ENOPROTOOPT => return error.InvalidProtocolOption,5517 ENOPROTOOPT => return error.InvalidProtocolOption,
5515 ENOMEM => return error.SystemResources,5518 ENOMEM => return error.SystemResources,
5516 ENOBUFS => return error.SystemResources,5519 ENOBUFS => return error.SystemResources,
5520 EPERM => return error.PermissionDenied,
5517 else => |err| return unexpectedErrno(err),5521 else => |err| return unexpectedErrno(err),
5518 }5522 }
5519 }5523 }