diff options
author | Yonatan Goldschmidt <yon.goldschmidt@gmail.com> | 2020-05-10 01:48:27 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-10 01:04:10 +0200 |
commit | 2ac3d33c63800f9a2fef4b0fe1947fb0d55d720b (patch) | |
tree | 0c5e706cbb9add38828912638dd1213e55a49943 | |
parent | 9e74793ce2a6993016306a45e37bb91c20a0d9bd (diff) | |
download | serenity-2ac3d33c63800f9a2fef4b0fe1947fb0d55d720b.zip |
LibC: Fix get{sock,peer}name to match their kernel-side prototypes
In f4302b58fb0, the kernel-side syscalls (e.g Process::sys$getsockname)
were updated to use SC_get{sock,peer}name_params, but the libc
functions were not updated.
-rw-r--r-- | Libraries/LibC/sys/socket.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Libraries/LibC/sys/socket.cpp b/Libraries/LibC/sys/socket.cpp index b604c688c2..81e83aaed7 100644 --- a/Libraries/LibC/sys/socket.cpp +++ b/Libraries/LibC/sys/socket.cpp @@ -108,13 +108,15 @@ int setsockopt(int sockfd, int level, int option, const void* value, socklen_t v int getsockname(int sockfd, struct sockaddr* addr, socklen_t* addrlen) { - int rc = syscall(SC_getsockname, sockfd, addr, addrlen); + Syscall::SC_getsockname_params params { sockfd, addr, addrlen }; + int rc = syscall(SC_getsockname, ¶ms); __RETURN_WITH_ERRNO(rc, rc, -1); } int getpeername(int sockfd, struct sockaddr* addr, socklen_t* addrlen) { - int rc = syscall(SC_getpeername, sockfd, addr, addrlen); + Syscall::SC_getpeername_params params { sockfd, addr, addrlen }; + int rc = syscall(SC_getpeername, ¶ms); __RETURN_WITH_ERRNO(rc, rc, -1); } } |