summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch b/meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch
new file mode 100644
index 0000000000..76a1c7364d
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch
@@ -0,0 +1,31 @@
1From 6bcf562bd1e541c7aa46923d9a14201c7f785261 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 16 Dec 2019 12:49:07 -0800
4Subject: [PATCH] Use INT_MAX instead of TIME_T_MAX for timerfd_settime timeout
5
6kernel prior to 64bit time_t support might not entertain such large
7timeout therefore reduce it to INT_MAX which would set timer expiration
8event after 68 years of uptime, should be good for all practical
9purposes
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/basic/time-util.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/basic/time-util.c b/src/basic/time-util.c
17index bfe2c60da1..8cf682b36a 100644
18--- a/src/basic/time-util.c
19+++ b/src/basic/time-util.c
20@@ -1486,7 +1486,7 @@ int time_change_fd(void) {
21
22 /* We only care for the cancellation event, hence we set the timeout to the latest possible value. */
23 static const struct itimerspec its = {
24- .it_value.tv_sec = TIME_T_MAX,
25+ .it_value.tv_sec = INT_MAX,
26 };
27
28 _cleanup_close_ int fd;
29--
302.24.1
31