1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-08 20:58:20 +03:00

timesync: fix wrong type for receiving timestamp in nanoseconds

(cherry picked from commit 6f96bdc58746b1698bf8b3430a6c638f8949daec)
This commit is contained in:
Yu Watanabe 2021-08-20 08:40:11 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent a840aa6bad
commit 502e6e1bb6
2 changed files with 3 additions and 1 deletions

View File

@ -78,5 +78,7 @@ int main(void) {
printf("big_enum2_pos → %zu\n", sizeof(big_enum2_pos));
printf("big_enum2_neg → %zu\n", sizeof(big_enum2_neg));
printf("timeval: %zu\n", sizeof(struct timeval));
printf("timespec: %zu\n", sizeof(struct timespec));
return 0;
}

View File

@ -413,7 +413,7 @@ 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(sizeof(struct timeval))) control;
CMSG_BUFFER_TYPE(CMSG_SPACE(sizeof(struct timespec))) control;
union sockaddr_union server_addr;
struct msghdr msghdr = {
.msg_iov = &iov,