Skip to content

Commit

Permalink
selftests: timers: valid-adjtimex: build fix for newer toolchains
Browse files Browse the repository at this point in the history
[ Upstream commit 9a16297 ]

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: e03a58c ("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>
  • Loading branch information
Wolfram Sang authored and gregkh committed Aug 17, 2022
1 parent 070527c commit 4d34813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/timers/valid-adjtimex.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#define ADJ_SETOFFSET 0x0100

#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);
}
Expand Down

0 comments on commit 4d34813

Please sign in to comment.