[Git][NTPsec/ntpsec][master] Deleted 2 commits: MUSL port patches.

Eric S. Raymond gitlab at mg.gitlab.com
Fri Aug 19 12:17:18 UTC 2016


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


WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.


Deleted commits:
9765740e by Stephen Walker at 2016-08-19T07:28:16-04:00
MUSL port patches.

- - - - -
f3cbc482 by Eric S. Raymond at 2016-08-19T08:17:06-04:00
Remove unused feature check.

Not needed since the thread-initialization crash was fixed.

- - - - -


3 changed files:

- ntpd/ntp_intercept.c
- ntptime/ntptime.c
- wafhelpers/configure.py


Changes:

=====================================
ntpd/ntp_intercept.c
=====================================
--- a/ntpd/ntp_intercept.c
+++ b/ntpd/ntp_intercept.c
@@ -106,6 +106,11 @@ Reference-clock events are not yet intercepted.
 #include "ntp_syscall.h"
 #include "ntp_leapsec.h"
 
+/* MUSL port shim */
+#if !defined(HAVE_NTP_ADJTIME) && defined(HAVE_ADJTIMEX)
+#define ntp_adjtime adjtimex
+#endif
+
 static intercept_mode mode = none;
 
 static char linebuf[256];


=====================================
ntptime/ntptime.c
=====================================
--- a/ntptime/ntptime.c
+++ b/ntptime/ntptime.c
@@ -26,6 +26,36 @@
 #define tv_frac_sec tv_usec
 #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)
+#else
+int ntp_gettime(struct timex *ntv)
+#endif
+{
+	struct timex tntx;
+	int result;
+
+	ZERO(tntx);
+	result = ntp_adjtime(&tntx);
+	ntv->time = tntx.time;
+	ntv->maxerror = tntx.maxerror;
+	ntv->esterror = tntx.esterror;
+#  ifdef NTP_API
+#   if NTP_API > 3
+	ntv->tai = tntx.tai;
+#   endif
+#  endif
+	return result;
+}
+#endif	/* !HAVE_NTP_GETTIME */
+
 
 #define TIMEX_MOD_BITS \
 "\20\1OFFSET\2FREQUENCY\3MAXERROR\4ESTERROR\5STATUS\6TIMECONST\
@@ -74,7 +104,11 @@ main(
 {
 	extern int ntp_optind;
 	extern char *ntp_optarg;
+#ifdef STRUCT_NTPTIMEVAL_HAS_TAI
 	struct ntptimeval ntv;
+#else
+	struct timex ntv;
+#endif
 	struct timeval tv;
 	struct timex ntx, _ntx;
 	int	times[20];


=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -237,6 +237,7 @@ def cmd_configure(ctx, config):
 		("time_tick", "timex", ["sys/time.h", "sys/timex.h"]),
 		("modes", "timex", ["sys/time.h", "sys/timex.h"]),
 		("time.tv_nsec", "ntptimeval", ["sys/time.h", "sys/timex.h"]),
+		("tai", "ntptimeval", ["sys/time.h", "sys/timex.h"]),
 		)
 	for (f, s, h) in structure_fields:
 		ctx.check_structfield(f, s, h)
@@ -272,7 +273,6 @@ def cmd_configure(ctx, config):
 	ctx.check_cc(lib="rt", mandatory=False, comment="realtime library")
 	ctx.check_cc(lib="curses", mandatory=False, comment="curses library, required for readline on OpenBSD") # Required for readline on OpenBSD.
 	ctx.check_cc(lib="readline", use="CURSES", mandatory=False, comment="readline library")
-	ctx.check_cc(lib="gcc_s", mandatory=False, comment="GCC runtime library.")
 
 	# Find OpenSSL. Must happen before function checks
 	if ctx.options.enable_crypto:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/153bfae5d56b2bcb9d43a61158a0756c45c3d2d6...f3cbc482539b9c6e7006ed5a616793fd6e74b4f0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160819/2673cb80/attachment.html>


More information about the vc mailing list