diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-12-29 10:43:58 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-30 23:39:09 +0000 |
commit | 28492364450fb205dc45b910f5c0f22cdc15c422 (patch) | |
tree | 2d0ca7c55960230a606bbe484de6aa314d2ced89 /meta/recipes-core | |
parent | 3be6b045afabfb4d5cf137b3e93cb004067b71bb (diff) | |
download | poky-28492364450fb205dc45b910f5c0f22cdc15c422.tar.gz |
systemd: Fix time_t size assumptions
(From OE-Core rev: 7f6aa3a10a3d31ef9b02b5ca2a1d8fcffdfcd334)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch | 31 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_243.2.bb | 1 |
2 files changed, 32 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 @@ | |||
1 | From 6bcf562bd1e541c7aa46923d9a14201c7f785261 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 16 Dec 2019 12:49:07 -0800 | ||
4 | Subject: [PATCH] Use INT_MAX instead of TIME_T_MAX for timerfd_settime timeout | ||
5 | |||
6 | kernel prior to 64bit time_t support might not entertain such large | ||
7 | timeout therefore reduce it to INT_MAX which would set timer expiration | ||
8 | event after 68 years of uptime, should be good for all practical | ||
9 | purposes | ||
10 | |||
11 | Signed-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 | |||
16 | diff --git a/src/basic/time-util.c b/src/basic/time-util.c | ||
17 | index 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 | -- | ||
30 | 2.24.1 | ||
31 | |||
diff --git a/meta/recipes-core/systemd/systemd_243.2.bb b/meta/recipes-core/systemd/systemd_243.2.bb index ac7a5f86b3..3f68604a5c 100644 --- a/meta/recipes-core/systemd/systemd_243.2.bb +++ b/meta/recipes-core/systemd/systemd_243.2.bb | |||
@@ -46,6 +46,7 @@ SRC_URI_MUSL = "\ | |||
46 | file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ | 46 | file://0019-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ |
47 | file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \ | 47 | file://0020-missing_type.h-add-__compar_d_fn_t-definition.patch \ |
48 | file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \ | 48 | file://0021-avoid-redefinition-of-prctl_mm_map-structure.patch \ |
49 | file://0022-Use-INT_MAX-instead-of-TIME_T_MAX-for-timerfd_settim.patch \ | ||
49 | file://0024-test-json.c-define-M_PIl.patch \ | 50 | file://0024-test-json.c-define-M_PIl.patch \ |
50 | file://0001-do-not-disable-buffer-in-writing-files.patch \ | 51 | file://0001-do-not-disable-buffer-in-writing-files.patch \ |
51 | file://0002-src-login-brightness.c-include-sys-wait.h.patch \ | 52 | file://0002-src-login-brightness.c-include-sys-wait.h.patch \ |