summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/adjtimex.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/adjtimex.c')
-rw-r--r--libc/sysdeps/linux/common/adjtimex.c10
1 files changed, 9 insertions, 1 deletions
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 <sys/syscall.h>
#include <sys/timex.h>
-
+#if defined(__NR_adjtimex)
_syscall1(int, adjtimex, struct timex *, buf)
+#else
+#include <time.h>
+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__