1*461a86f9Schristos /* $NetBSD: compat___ntp_gettime30.c,v 1.2 2009/01/11 02:46:26 christos Exp $ */ 2*461a86f9Schristos 3*461a86f9Schristos #include <sys/cdefs.h> 4*461a86f9Schristos #if defined(LIBC_SCCS) && !defined(lint) 5*461a86f9Schristos __RCSID("$NetBSD: compat___ntp_gettime30.c,v 1.2 2009/01/11 02:46:26 christos Exp $"); 6*461a86f9Schristos #endif /* LIBC_SCCS and not lint */ 7*461a86f9Schristos 8*461a86f9Schristos #define __LIBC12_SOURCE__ 9*461a86f9Schristos 10*461a86f9Schristos #include <sys/time.h> 11*461a86f9Schristos #include <sys/timex.h> 12*461a86f9Schristos #include <compat/sys/timex.h> 13*461a86f9Schristos 14*461a86f9Schristos __warn_references(__ntp_gettime30, 15*461a86f9Schristos "warning: reference to compatibility __ntp_gettime30(); include <sys/timex.h> for correct reference") 16*461a86f9Schristos 17*461a86f9Schristos int __ntp_gettime30(struct ntptimeval50 * ontvp)18*461a86f9Schristos__ntp_gettime30(struct ntptimeval50 *ontvp) 19*461a86f9Schristos { 20*461a86f9Schristos struct ntptimeval ntv; 21*461a86f9Schristos int res; 22*461a86f9Schristos 23*461a86f9Schristos res = __ntp_gettime50(&ntv); 24*461a86f9Schristos ontvp->time.tv_sec = (int32_t)ntv.time.tv_sec; 25*461a86f9Schristos ontvp->time.tv_nsec = ntv.time.tv_nsec; 26*461a86f9Schristos ontvp->maxerror = ntv.maxerror; 27*461a86f9Schristos ontvp->esterror = ntv.esterror; 28*461a86f9Schristos 29*461a86f9Schristos return (res); 30*461a86f9Schristos } 31