]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
sys_timex: add support for ntp_adjtime() via privops
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 9 Dec 2015 17:15:46 +0000 (18:15 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 10 Dec 2015 15:30:38 +0000 (16:30 +0100)
sys_timex.c

index 60018f150edfd7aeb2af7c0ade3f270300315169..7abb629e4503913d74ba2c976da7fd04647c1756 100644 (file)
 #include "sysincl.h"
 
 #include "conf.h"
+#include "privops.h"
 #include "sys_generic.h"
 #include "sys_timex.h"
 #include "logging.h"
 
+#ifdef PRIVOPS_ADJUSTTIMEX
+#define NTP_ADJTIME PRV_AdjustTimex
+#define NTP_ADJTIME_NAME "ntp_adjtime"
+#else
 #ifdef LINUX
 #define NTP_ADJTIME adjtimex
 #define NTP_ADJTIME_NAME "adjtimex"
@@ -41,6 +46,7 @@
 #define NTP_ADJTIME ntp_adjtime
 #define NTP_ADJTIME_NAME "ntp_adjtime"
 #endif
+#endif
 
 /* Maximum frequency offset accepted by the kernel (in ppm) */
 #define MAX_FREQ 500.0