4 * ntp_syscall.h - various ways to perform the ntp_adjtime() and ntp_gettime()
15 #ifdef HAVE_SYS_TIMEX_H
16 # include <sys/timex.h>
19 #ifndef NTP_SYSCALLS_LIBC
20 #ifdef NTP_SYSCALLS_STD
21 # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t))
22 # define ntp_gettime(t) syscall(SYS_ntp_gettime, (t))
23 #else /* !NTP_SYSCALLS_STD */
24 # ifdef HAVE___ADJTIMEX
25 extern int __adjtimex
P((struct timex
*));
27 # define ntp_adjtime(t) __adjtimex((t))
31 struct ntptimeval
*ntv
38 result
= __adjtimex (&tntx
);
39 ntv
->time
= tntx
.time
;
40 ntv
->maxerror
= tntx
.maxerror
;
41 ntv
->esterror
= tntx
.esterror
;
49 # else /* !HAVE__ADJTIMEX */
50 # ifdef HAVE___NTP_GETTIME
51 # define ntp_gettime(t) __ntp_gettime((t))
53 # endif /* !HAVE_ADJTIMEX */
54 #endif /* !NTP_SYSCALLS_STD */
55 #endif /* !NTP_SYSCALLS_LIBC */
57 #endif /* NTP_SYSCALL_H */