|
|
@@ -6,12 +6,20 @@
|
|
|
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
|
|
|
*/
|
|
|
|
|
|
+#include <sys/syscall.h>
|
|
|
#include <sys/timex.h>
|
|
|
#include <time.h>
|
|
|
|
|
|
int adjtimex(struct timex *buf)
|
|
|
{
|
|
|
+#ifdef __NR_clock_adjtime
|
|
|
return clock_adjtime(CLOCK_REALTIME, buf);
|
|
|
+#elif defined(__NR_adjtimex)
|
|
|
+ return syscall(__NR_adjtimex, buf);
|
|
|
+#else
|
|
|
+ errno = ENOSYS;
|
|
|
+ return -1;
|
|
|
+#endif
|
|
|
}
|
|
|
|
|
|
libc_hidden_def(adjtimex)
|