]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: do not assume __NR_settimeofday_time32
authorPino Toscano <toscano.pino@tiscali.it>
Tue, 17 Nov 2020 10:32:45 +0000 (11:32 +0100)
committerPino Toscano <toscano.pino@tiscali.it>
Tue, 17 Nov 2020 10:32:45 +0000 (11:32 +0100)
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

index 1f7ef331735a87c993490d035581b548a17824af..db448687dc025aebc1a3dd7a1d4d821742d989c0 100644 (file)
@@ -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