mirror of
https://github.com/ziglang/zig.git
synced 2025-12-13 01:33:09 +00:00
fix setsockopt returning ENODEV
This commit is contained in:
parent
5127dae7a2
commit
1459231624
@ -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),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user