mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 21:38:33 +00:00
Add AFNOSUPPORT error to bind (#12560)
This commit is contained in:
parent
7c91a6fe48
commit
36f4f32fad
@ -3447,6 +3447,9 @@ pub const BindError = error{
|
||||
/// A nonexistent interface was requested or the requested address was not local.
|
||||
AddressNotAvailable,
|
||||
|
||||
/// The address is not valid for the address family of socket.
|
||||
AddressFamilyNotSupported,
|
||||
|
||||
/// Too many symbolic links were encountered in resolving addr.
|
||||
SymLinkLoop,
|
||||
|
||||
@ -3502,6 +3505,7 @@ pub fn bind(sock: socket_t, addr: *const sockaddr, len: socklen_t) BindError!voi
|
||||
.BADF => unreachable, // always a race condition if this error is returned
|
||||
.INVAL => unreachable, // invalid parameters
|
||||
.NOTSOCK => unreachable, // invalid `sockfd`
|
||||
.AFNOSUPPORT => return error.AddressFamilyNotSupported,
|
||||
.ADDRNOTAVAIL => return error.AddressNotAvailable,
|
||||
.FAULT => unreachable, // invalid `addr` pointer
|
||||
.LOOP => return error.SymLinkLoop,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user