authorgravatar for git@l4.pmLuna <git@l4.pm> 2019-10-26 22:05:17-03:00
committergravatar for git@l4.pmLuna <git@l4.pm> 2019-10-26 22:05:17-03:00
logd4e41c5bc616114beb44969585b47c1ec2a8c9ed
tree5fdbbc01ba4c7430a94a9bec575ba6e260a3c2c4
parentbf16fc210bc765202489ae83e0ad1dce8d9b4e16

std: make addr_size parameter be a pointer to socklen_t

removes ptrCast

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

lib/std/os.zig+2-2
......@@ -1654,7 +1654,7 @@ pub fn accept4(
16541654 ///
16551655 /// The returned address is truncated if the buffer provided is too small; in this case, `addr_size`
16561656 /// will return a value greater than was supplied to the call.
1657 addr_size: *usize,
1657 addr_size: *socklen_t,
16581658 /// If flags is 0, then `accept4` is the same as `accept`. The following values can be bitwise
16591659 /// ORed in flags to obtain different behavior:
16601660 /// * `SOCK_NONBLOCK` - Set the `O_NONBLOCK` file status flag on the open file description (see `open`)
......@@ -1665,7 +1665,7 @@ pub fn accept4(
16651665 flags: u32,
16661666) AcceptError!i32 {
16671667 while (true) {
1668 const rc = system.accept4(sockfd, addr, @ptrCast(*system.socklen_t, addr_size), flags);
1668 const rc = system.accept4(sockfd, addr, addr_size, flags);
16691669 switch (errno(rc)) {
16701670 0 => return @intCast(i32, rc),
16711671 EINTR => continue,