1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:17:35 +00:00

Kernel+LibC: Use uintptr_t as the main type in the syscall interface

This commit is contained in:
Andreas Kling 2020-10-12 14:49:31 +02:00
parent 583bfa04e2
commit 65cdac1a5b
5 changed files with 25 additions and 19 deletions

View file

@ -103,7 +103,7 @@ ssize_t recvfrom(int sockfd, void* buffer, size_t buffer_length, int flags, stru
sockaddr_storage internal_addr;
iovec iov = { buffer, buffer_length };
msghdr msg = { addr ? &internal_addr : nullptr, addr ? sizeof(internal_addr) : 0, &iov, 1, nullptr, 0, 0 };
msghdr msg = { addr ? &internal_addr : nullptr, addr ? (socklen_t)sizeof(internal_addr) : 0, &iov, 1, nullptr, 0, 0 };
ssize_t rc = recvmsg(sockfd, &msg, flags);
if (rc >= 0 && addr) {
memcpy(addr, &internal_addr, min(*addr_length, msg.msg_namelen));