journal,network,timesync: fix segfault on 32bit timeval/timespec systems

Fixes #20741.
This commit is contained in:
Yu Watanabe
2021-09-16 11:47:44 +02:00
committed by Lennart Poettering
parent 5aaa55d841
commit f782eee68a
3 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -416,7 +416,8 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re
.iov_base = &ntpmsg,
.iov_len = sizeof(ntpmsg),
};
CMSG_BUFFER_TYPE(CMSG_SPACE_TIMESPEC) control;
/* This needs to be initialized with zero. See #20741. */
CMSG_BUFFER_TYPE(CMSG_SPACE_TIMESPEC) control = {};
union sockaddr_union server_addr;
struct msghdr msghdr = {
.msg_iov = &iov,