代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 6f96bdc58746b1698bf8b3430a6c638f8949daec Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Fri, 20 Aug 2021 08:40:11 +0900
Subject: [PATCH] timesync: fix wrong type for receiving timestamp in
nanoseconds
Fixes #20482.
---
src/test/test-sizeof.c | 2 ++
src/timesync/timesyncd-manager.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c
index 3c9dc180fa..e36bee4e8f 100644
--- a/src/test/test-sizeof.c
+++ b/src/test/test-sizeof.c
@@ -89,5 +89,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;
}
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
index 1c284f31e3..3a89d9b1fa 100644
--- a/src/timesync/timesyncd-manager.c
+++ b/src/timesync/timesyncd-manager.c
@@ -416,7 +416,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,
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。