mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
Fix implementation of std.os.linux.accept on x86
This commit is contained in:
parent
9070607c03
commit
0cb9ffc6d8
@ -1980,7 +1980,7 @@ pub fn socketpair(domain: i32, socket_type: i32, protocol: i32, fd: *[2]i32) usi
|
||||
|
||||
pub fn accept(fd: i32, noalias addr: ?*sockaddr, noalias len: ?*socklen_t) usize {
|
||||
if (native_arch == .x86) {
|
||||
return socketcall(SC.accept, &[4]usize{ fd, addr, len, 0 });
|
||||
return socketcall(SC.accept, &[4]usize{ @as(usize, @bitCast(@as(isize, fd))), @intFromPtr(addr), @intFromPtr(len), 0 });
|
||||
}
|
||||
return accept4(fd, addr, len, 0);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user