authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-10-26 21:31:38-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2019-10-26 21:31:38-04:00
log05003d533a8a4f4c49f7a251e26b5dfff5f278b3
tree5fdbbc01ba4c7430a94a9bec575ba6e260a3c2c4
parentfafd1fd4806e4f92b19bd5285cbe8d6748a90c54
parentd4e41c5bc616114beb44969585b47c1ec2a8c9ed
signature Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #3537 from lun-4/fix/accept4

fix std.os.accept4

1 files changed, 5 insertions(+), 1 deletions(-)

lib/std/os.zig+5-1
......@@ -1630,6 +1630,10 @@ pub const AcceptError = error{
16301630
16311631 /// Firewall rules forbid connection.
16321632 BlockedByFirewall,
1633
1634 /// This error occurs when no global event loop is configured,
1635 /// and accepting from the socket would block.
1636 WouldBlock,
16331637} || UnexpectedError;
16341638
16351639/// Accept a connection on a socket.
......@@ -1650,7 +1654,7 @@ pub fn accept4(
16501654 ///
16511655 /// The returned address is truncated if the buffer provided is too small; in this case, `addr_size`
16521656 /// will return a value greater than was supplied to the call.
1653 addr_size: *usize,
1657 addr_size: *socklen_t,
16541658 /// If flags is 0, then `accept4` is the same as `accept`. The following values can be bitwise
16551659 /// ORed in flags to obtain different behavior:
16561660 /// * `SOCK_NONBLOCK` - Set the `O_NONBLOCK` file status flag on the open file description (see `open`)