Newer 32-bit architectures e.g. riscv32 are using 64-bit time_t from get go, they have not wired __NR_clock_adjtime at all valid-adjtimex testcase fails to compile on such architectures. if this condition is found then use 64-bit adjtime syscall Signed-off-by: Khem Raj <raj.khem@xxxxxxxxx> Cc: John Stultz <jstultz@xxxxxxxxxx> Cc: Shuah Khan <shuah@xxxxxxxxxx> --- tools/testing/selftests/timers/valid-adjtimex.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/timers/valid-adjtimex.c b/tools/testing/selftests/timers/valid-adjtimex.c index d500884801d8..ff4ff8b1d127 100644 --- a/tools/testing/selftests/timers/valid-adjtimex.c +++ b/tools/testing/selftests/timers/valid-adjtimex.c @@ -39,7 +39,11 @@ #include <sys/syscall.h> int clock_adjtime(clockid_t id, struct timex *tx) { +#if !defined(__NR_clock_adjtime) && defined(__NR_clock_adjtime64) + return syscall(__NR_clock_adjtime64, id, tx); +#else return syscall(__NR_clock_adjtime, id, tx); +#endif }