summaryrefslogtreecommitdiffstats
path: root/debian/patches/upstream/upstream_hwclock-do-not-assume-__NR_settimeofday_time32.patch
blob: 1a12f0fb462d8e5ebdf09867147a48915b53c0e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Pino Toscano <toscano.pino@tiscali.it>
Date: Tue, 17 Nov 2020 11:32:45 +0100
Subject: [PATCH] hwclock: do not assume __NR_settimeofday_time32

Check that __NR_settimeofday_time32 exists before trying to use it as
syscall number.

Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
---
 sys-utils/hwclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
index c1cfbd3..e50432a 100644
--- a/sys-utils/hwclock.c
+++ b/sys-utils/hwclock.c
@@ -678,7 +678,7 @@ display_time(struct timeval hwctime)
 #ifndef SYS_settimeofday
 # ifdef __NR_settimeofday
 #  define SYS_settimeofday	__NR_settimeofday
-# else
+# elif defined(__NR_settimeofday_time32)
 #  define SYS_settimeofday	__NR_settimeofday_time32
 # endif
 #endif