selftests: timers: valid-adjtimex: build fix for newer toolchains

[ Upstream commit 9a162977d20436be5678a8e21a8e58eb4616d86a ]

Toolchains with an include file 'sys/timex.h' based on 3.18 will have a
'clock_adjtime' definition added, so it can't be static in the code:

valid-adjtimex.c:43:12: error: static declaration of ‘clock_adjtime’ follows non-static declaration

Fixes: e03a58c320 ("kselftests: timers: Add adjtimex SETOFFSET validity tests")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: John Stultz <jstultz@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Wolfram Sang 2022-07-13 22:46:13 +02:00 committed by Greg Kroah-Hartman
parent 8ebe6121e7
commit 2f243fe8db

View File

@ -40,7 +40,7 @@
#define ADJ_SETOFFSET 0x0100 #define ADJ_SETOFFSET 0x0100
#include <sys/syscall.h> #include <sys/syscall.h>
static int clock_adjtime(clockid_t id, struct timex *tx) int clock_adjtime(clockid_t id, struct timex *tx)
{ {
return syscall(__NR_clock_adjtime, id, tx); return syscall(__NR_clock_adjtime, id, tx);
} }