From 33e1b11555d3557a36bd69d63f5bf0c290b5d462 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Wed, 26 Jun 2024 01:41:28 +0200 Subject: LibC: Fix printf formatting Previously %02x would not print out padding if the given value was zero. --- userland/libc/sys/socket/getpeername.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 userland/libc/sys/socket/getpeername.c (limited to 'userland/libc/sys') diff --git a/userland/libc/sys/socket/getpeername.c b/userland/libc/sys/socket/getpeername.c new file mode 100644 index 0000000..25a56b1 --- /dev/null +++ b/userland/libc/sys/socket/getpeername.c @@ -0,0 +1,7 @@ +#include +#include + +int getpeername(int sockfd, struct sockaddr *restrict addr, + socklen_t *restrict addrlen) { + RC_ERRNO(syscall(SYS_GETPEERNAME, sockfd, addr, addrlen, 0, 0)); +} -- cgit v1.2.3