2 * ntp_syscall.h - various ways to perform the ntp_adjtime() and ntp_gettime()
13 #ifdef HAVE_SYS_TIMEX_H
14 # include <sys/timex.h>
17 #ifndef NTP_SYSCALLS_LIBC
18 #ifdef NTP_SYSCALLS_STD
19 # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t))
20 # define ntp_gettime(t) syscall(SYS_ntp_gettime, (t))
21 #else /* !NTP_SYSCALLS_STD */
22 # ifdef HAVE___ADJTIMEX
23 extern int __adjtimex P((struct timex *));
25 # define ntp_adjtime(t) __adjtimex((t))
29 struct ntptimeval *ntv
36 result = __adjtimex (&tntx);
37 ntv->time = tntx.time;
38 ntv->maxerror = tntx.maxerror;
39 ntv->esterror = tntx.esterror;
47 # else /* !HAVE__ADJTIMEX */
48 # ifdef HAVE___NTP_GETTIME
49 # define ntp_gettime(t) __ntp_gettime((t))
51 # endif /* !HAVE_ADJTIMEX */
52 #endif /* !NTP_SYSCALLS_STD */
53 #endif /* !NTP_SYSCALLS_LIBC */
55 #endif /* NTP_SYSCALL_H */