authorgravatar for xq@random-projects.netFelix "xq" Queißner <xq@random-projects.net> 2022-02-23 08:32:54+01:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2022-02-23 09:32:54+02:00
log6fdcf1ad2d860120564f328535903c4c70e30a0d
treef381aec92849386c4fedba977a23ca05d59a24f6
parente5c30eef1f338ed65325ddbfd4d631baef0d9b81
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

std.os.linux.socketpair: fd is an out parameter


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

lib/std/os/linux.zig+3-3
...@@ -1269,11 +1269,11 @@ pub fn sendfile(outfd: i32, infd: i32, offset: ?*i64, count: usize) usize {...@@ -1269,11 +1269,11 @@ pub fn sendfile(outfd: i32, infd: i32, offset: ?*i64, count: usize) usize {
1269 }1269 }
1270}1270}
12711271
1272pub fn socketpair(domain: i32, socket_type: i32, protocol: i32, fd: [2]i32) usize {1272pub fn socketpair(domain: i32, socket_type: i32, protocol: i32, fd: *[2]i32) usize {
1273 if (native_arch == .i386) {1273 if (native_arch == .i386) {
1274 return socketcall(SC.socketpair, &[4]usize{ @intCast(usize, domain), @intCast(usize, socket_type), @intCast(usize, protocol), @ptrToInt(&fd[0]) });1274 return socketcall(SC.socketpair, &[4]usize{ @intCast(usize, domain), @intCast(usize, socket_type), @intCast(usize, protocol), @ptrToInt(fd) });
1275 }1275 }
1276 return syscall4(.socketpair, @intCast(usize, domain), @intCast(usize, socket_type), @intCast(usize, protocol), @ptrToInt(&fd[0]));1276 return syscall4(.socketpair, @intCast(usize, domain), @intCast(usize, socket_type), @intCast(usize, protocol), @ptrToInt(fd));
1277}1277}
12781278
1279pub fn accept(fd: i32, noalias addr: ?*sockaddr, noalias len: ?*socklen_t) usize {1279pub fn accept(fd: i32, noalias addr: ?*sockaddr, noalias len: ?*socklen_t) usize {