mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
std.os: handle EPERM errno for bind
This commit is contained in:
parent
9964f1c160
commit
da0509750a
@ -3474,7 +3474,7 @@ pub fn bind(sock: socket_t, addr: *const sockaddr, len: socklen_t) BindError!voi
|
||||
const rc = system.bind(sock, addr, len);
|
||||
switch (errno(rc)) {
|
||||
.SUCCESS => return,
|
||||
.ACCES => return error.AccessDenied,
|
||||
.ACCES, .PERM => return error.AccessDenied,
|
||||
.ADDRINUSE => return error.AddressInUse,
|
||||
.BADF => unreachable, // always a race condition if this error is returned
|
||||
.INVAL => unreachable, // invalid parameters
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user