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,
FileDescriptorNotASocket,
SocketNotBound,
NoDevice,
} || UnexpectedError;
/// 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,
.NOBUFS => return error.SystemResources,
.PERM => return error.PermissionDenied,
.NODEV => return error.NoDevice,
else => |err| return unexpectedErrno(err),
}
}