]> 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)
committerKarel Zak <kzak@redhat.com>
Wed, 10 Feb 2021 08:32:42 +0000 (09: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 c1cfbd3949328e34cc906f5eabdf1f7d91e52643..e50432aee4b18c7f3218fa20eb0f788038340f87 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