blob: 3e818470fe7acbf65396492595d8395f8795933c [file] [log] [blame]
Andrew Geisslerc723b722021-01-08 16:14:09 -06001From 367972fae13d170675768d63678577cae1890143 Mon Sep 17 00:00:00 2001
2From: Pino Toscano <toscano.pino@tiscali.it>
3Date: Tue, 17 Nov 2020 11:32:45 +0100
4Subject: [PATCH] hwclock: do not assume __NR_settimeofday_time32
5
6Check that __NR_settimeofday_time32 exists before trying to use it as
7syscall number.
8
9Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/367972fae13d170675768d63678577cae1890143]
10Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
11---
12 sys-utils/hwclock.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
16index 1f7ef3317..db448687d 100644
17--- a/sys-utils/hwclock.c
18+++ b/sys-utils/hwclock.c
19@@ -678,7 +678,7 @@ display_time(struct timeval hwctime)
20 #ifndef SYS_settimeofday
21 # ifdef __NR_settimeofday
22 # define SYS_settimeofday __NR_settimeofday
23-# else
24+# elif defined(__NR_settimeofday_time32)
25 # define SYS_settimeofday __NR_settimeofday_time32
26 # endif
27 #endif
28--
292.29.2
30