commit 002cdf70cf43e0b8e8452187afe6d3e3f606fd9d
parent a122e46efe97d286f1a54a1924bec761626a160f
Author: Mykyta Holubakha <hilobakho@gmail.com>
Date: Mon, 29 Mar 2021 21:26:43 +0300
rt: added getpeername syscall
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha
@@ -521,3 +521,8 @@ export fn getsockname(sockfd: int, addr: nullable *sockaddr, addrlen: nullable *
sockfd: u64, addr: uintptr: u64, addrlen: uintptr: u64))?: int;
};
+export fn getpeername(sockfd: int, addr: nullable *sockaddr, addrlen: nullable *u32) (int | errno) = {
+ return wrap_return(syscall3(SYS_getpeername,
+ sockfd: u64, addr: uintptr: u64, addrlen: uintptr: u64))?: int;
+};
+