| ... | ... | @@ -1630,6 +1630,10 @@ pub const AcceptError = error{ |
| 1630 | 1630 | |
| 1631 | 1631 | /// Firewall rules forbid connection. |
| 1632 | 1632 | BlockedByFirewall, |
| 1633 | |
| 1634 | /// This error occurs when no global event loop is configured, |
| 1635 | /// and accepting from the socket would block. |
| 1636 | WouldBlock, |
| 1633 | 1637 | } || UnexpectedError; |
| 1634 | 1638 | |
| 1635 | 1639 | /// Accept a connection on a socket. |
| ... | ... | @@ -1661,7 +1665,7 @@ pub fn accept4( |
| 1661 | 1665 | flags: u32, |
| 1662 | 1666 | ) AcceptError!i32 { |
| 1663 | 1667 | while (true) { |
| 1664 | | const rc = system.accept4(sockfd, addr, addr_size, flags); |
| 1668 | const rc = system.accept4(sockfd, addr, @ptrCast(*system.socklen_t, addr_size), flags); |
| 1665 | 1669 | switch (errno(rc)) { |
| 1666 | 1670 | 0 => return @intCast(i32, rc), |
| 1667 | 1671 | EINTR => continue, |