summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-02-28 02:48:45 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-02 08:36:08 +0100
commit5c15ca7b84d015059043b4f93b2843a50bcd05e4 (patch)
tree846a0fa0f9cbf5329e00ed43beb95aaa0f12f835 /Kernel/Syscalls
parent719cb93a1ac6b9f72e580273792c16e0c8e70946 (diff)
downloadserenity-5c15ca7b84d015059043b4f93b2843a50bcd05e4.zip
Kernel: Make sockets use AK::Time
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r--Kernel/Syscalls/socket.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/socket.cpp b/Kernel/Syscalls/socket.cpp
index a68b930783..130dc89766 100644
--- a/Kernel/Syscalls/socket.cpp
+++ b/Kernel/Syscalls/socket.cpp
@@ -252,7 +252,7 @@ KResultOr<ssize_t> Process::sys$recvmsg(int sockfd, Userspace<struct msghdr*> us
auto data_buffer = UserOrKernelBuffer::for_user_buffer((u8*)iovs[0].iov_base, iovs[0].iov_len);
if (!data_buffer.has_value())
return EFAULT;
- timeval timestamp = { 0, 0 };
+ Time timestamp {};
auto result = socket.recvfrom(*description, data_buffer.value(), iovs[0].iov_len, flags, user_addr, user_addr_length, timestamp);
if (flags & MSG_DONTWAIT)
description->set_blocking(original_blocking);
@@ -276,7 +276,7 @@ KResultOr<ssize_t> Process::sys$recvmsg(int sockfd, Userspace<struct msghdr*> us
if (msg.msg_controllen < control_length) {
msg_flags |= MSG_CTRUNC;
} else {
- cmsg_timestamp = { { control_length, SOL_SOCKET, SCM_TIMESTAMP }, timestamp };
+ cmsg_timestamp = { { control_length, SOL_SOCKET, SCM_TIMESTAMP }, timestamp.to_timeval() };
if (!copy_to_user(msg.msg_control, &cmsg_timestamp, control_length))
return EFAULT;
}