[Git][NTPsec/ntpsec][master] Remove duplicare code, refactor MUSL patch.

Eric S. Raymond gitlab at mg.gitlab.com
Sun Oct 2 14:31:24 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
7a7841cd by Eric S. Raymond at 2016-10-02T10:30:45-04:00
Remove duplicare code, refactor MUSL patch.

- - - - -


4 changed files:

- include/ntp_syscall.h
- ntpd/ntp_control.c
- ntpd/ntp_loopfilter.c
- ntptime/ntptime.c


Changes:

=====================================
include/ntp_syscall.h
=====================================
--- a/include/ntp_syscall.h
+++ b/include/ntp_syscall.h
@@ -27,4 +27,9 @@ struct ntptimeval
 int ntp_gettime(struct ntptimeval *);
 #endif	/* !HAVE_STRUCT_NTPTIMEVAL */
 
+/* MUSL port shim */
+#if !defined(HAVE_NTP_ADJTIME) && defined(HAVE_ADJTIMEX)
+#define ntp_adjtime adjtimex
+#endif
+
 #endif	/* GUARD_NTP_SYSCALL_H */


=====================================
ntpd/ntp_control.c
=====================================
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -24,6 +24,7 @@
 #include "ntp_md5.h"	/* provides OpenSSL digest API */
 #include "ntp_intercept.h"
 #include "lib_strbuf.h"
+#include "ntp_syscall.h"
 
 /*
  * Structure to hold request procedure information


=====================================
ntpd/ntp_loopfilter.c
=====================================
--- a/ntpd/ntp_loopfilter.c
+++ b/ntpd/ntp_loopfilter.c
@@ -6,12 +6,6 @@
  */
 #include <config.h>
 
-#include "ntpd.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntp_stdlib.h"
-#include "ntp_intercept.h"
-
 #include <limits.h>
 #include <stdio.h>
 #include <ctype.h>
@@ -19,6 +13,13 @@
 #include <signal.h>
 #include <setjmp.h>
 
+#include "ntpd.h"
+#include "ntp_io.h"
+#include "ntp_unixtime.h"
+#include "ntp_stdlib.h"
+#include "ntp_intercept.h"
+#include "ntp_syscall.h"
+
 /*
  * This is an implementation of the clock discipline algorithm described
  * in UDel TR 97-4-3, as amended. It operates as an adaptive parameter,


=====================================
ntptime/ntptime.c
=====================================
--- a/ntptime/ntptime.c
+++ b/ntptime/ntptime.c
@@ -27,11 +27,6 @@
 #endif
 
 /* MUSL port shim */
-#if !defined(HAVE_NTP_ADJTIME) && defined(HAVE_ADJTIMEX)
-#define ntp_adjtime adjtimex
-#endif
-
-/* MUSL port shim */
 #ifndef HAVE_NTP_GETTIME
 #ifdef STRUCT_NTPTIMEVAL_HAS_TAI
 int ntp_gettime(struct ntptimeval *ntv)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7a7841cdae577ee6a8074f3276800aa9692e41e8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161002/67a9da34/attachment.html>


More information about the vc mailing list