1 Star 0 Fork 49

happy_orange/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0603-sd-event-use-usec_add.patch 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
renbo02 提交于 2021-12-27 17:02 . update to systemd-239-51.el8
From b79e00d8f97b8c959c5b17f0547c680f86dd9132 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Tue, 15 Jun 2021 01:01:48 +0900
Subject: [PATCH] sd-event: use usec_add()
(cherry picked from commit a595fb5ca9c69c589e758e9ebe3b70ac90450ba3)
Related: #1968528
---
src/libsystemd/sd-event/sd-event.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 6a20b658e4..f675c09d84 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -3514,8 +3514,8 @@ static int arm_watchdog(sd_event *e) {
assert(e->watchdog_fd >= 0);
t = sleep_between(e,
- e->watchdog_last + (e->watchdog_period / 2),
- e->watchdog_last + (e->watchdog_period * 3 / 4));
+ usec_add(e->watchdog_last, (e->watchdog_period / 2)),
+ usec_add(e->watchdog_last, (e->watchdog_period * 3 / 4)));
timespec_store(&its.it_value, t);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/happy_orange/systemd.git
git@gitee.com:happy_orange/systemd.git
happy_orange
systemd
systemd
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385