summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Utilities/ntpquery.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Userland/Utilities/ntpquery.cpp b/Userland/Utilities/ntpquery.cpp
index 2ca0fcad28..3a88bb9dc8 100644
--- a/Userland/Utilities/ntpquery.cpp
+++ b/Userland/Utilities/ntpquery.cpp
@@ -187,7 +187,15 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
iovec iov { &packet, sizeof(packet) };
char control_message_buffer[CMSG_SPACE(sizeof(timeval))];
- msghdr msg = { &peer_address, sizeof(peer_address), &iov, 1, control_message_buffer, sizeof(control_message_buffer), 0 };
+ msghdr msg = {};
+ msg.msg_name = &peer_address;
+ msg.msg_namelen = sizeof(peer_address);
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+ msg.msg_control = control_message_buffer;
+ msg.msg_controllen = sizeof(control_message_buffer);
+ msg.msg_flags = 0;
+
rc = recvmsg(fd, &msg, 0);
if (rc < 0) {
perror("recvmsg");