From 48591e2a259d84247ae38f050bd58e6f7450bb77 Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Fri, 12 Apr 2024 19:27:50 +0300 Subject: Provide fixups for riscv32. - Use TIME64 by default for rv32, usage of 32-bit time leads to a lot of incompatibilities with linux kernel 6.6.x and later versions. - Add some other corrections to use proper system calls on riscv32 platform. Signed-off-by: Dmitry Chestnykh --- libc/sysdeps/linux/common/adjtimex.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/common/adjtimex.c') diff --git a/libc/sysdeps/linux/common/adjtimex.c b/libc/sysdeps/linux/common/adjtimex.c index f45d54371..2fd7977f6 100644 --- a/libc/sysdeps/linux/common/adjtimex.c +++ b/libc/sysdeps/linux/common/adjtimex.c @@ -9,8 +9,16 @@ #include #include - +#if defined(__NR_adjtimex) _syscall1(int, adjtimex, struct timex *, buf) +#else +#include +int adjtimex(struct timex *buf) +{ + return clock_adjtime(CLOCK_REALTIME, buf); +} +#endif + libc_hidden_def(adjtimex) weak_alias(adjtimex,__adjtimex) #if defined __UCLIBC_NTP_LEGACY__ -- cgit v1.2.3