fix setsockopt returning ENODEV

This commit is contained in:
Jens Goldberg 2022-10-16 20:31:07 +02:00 committed by Veikka Tuominen
parent 5127dae7a2
commit 1459231624

View File

@ -6547,6 +6547,7 @@ pub const SetSockOptError = error{
NetworkSubsystemFailed, NetworkSubsystemFailed,
FileDescriptorNotASocket, FileDescriptorNotASocket,
SocketNotBound, SocketNotBound,
NoDevice,
} || UnexpectedError; } || UnexpectedError;
/// Set a socket's options. /// Set a socket's options.
@ -6577,6 +6578,7 @@ pub fn setsockopt(fd: socket_t, level: u32, optname: u32, opt: []const u8) SetSo
.NOMEM => return error.SystemResources, .NOMEM => return error.SystemResources,
.NOBUFS => return error.SystemResources, .NOBUFS => return error.SystemResources,
.PERM => return error.PermissionDenied, .PERM => return error.PermissionDenied,
.NODEV => return error.NoDevice,
else => |err| return unexpectedErrno(err), else => |err| return unexpectedErrno(err),
} }
} }