[Git][NTPsec/ntpsec][master] Attempt to repair the OS X build.
Eric S. Raymond
gitlab at mg.gitlab.com
Wed Oct 12 11:00:18 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
87e31316 by Eric S. Raymond at 2016-10-12T00:13:58-04:00
Attempt to repair the OS X build.
- - - - -
2 changed files:
- include/ntp_syscall.h
- libntp/machines.c
Changes:
=====================================
include/ntp_syscall.h
=====================================
--- a/include/ntp_syscall.h
+++ b/include/ntp_syscall.h
@@ -14,6 +14,7 @@
#ifdef HAVE_SYS_TIMEX_H
# include <sys/time.h> /* prerequisite on NetBSD */
# include <sys/timex.h>
+extern int ntp_adjtime_ns(struct timex *);
#endif
#ifndef HAVE_STRUCT_NTPTIMEVAL
@@ -39,8 +40,6 @@ int ntp_gettime(struct ntptimeval *);
#define ntp_error_in_seconds(n) ((n)/1.0e6)
# endif
-extern int ntp_adjtime_ns(struct timex *);
-
/* MUSL port shim */
#if !defined(HAVE_NTP_ADJTIME) && defined(HAVE_ADJTIMEX)
#define ntp_adjtime adjtimex
=====================================
libntp/machines.c
=====================================
--- a/libntp/machines.c
+++ b/libntp/machines.c
@@ -59,6 +59,7 @@ int clock_gettime(clockid_t clk_id, struct timespec *tp)
}
#endif /* HAVE_CLOCK_GETTIME */
+#ifdef HAVE_SYS_TIMEX_H
/*
* ntp_adjtime at nanosecond precision. Hiding the units difference
* here helps prevent loss-of-precision bugs elsewhere. We
@@ -104,6 +105,7 @@ int ntp_adjtime_ns(struct timex *ntx)
}
return errval;
}
+#endif /* HAVE_SYS_TIMEX_H */
#if !defined(HAVE_NTP_GETTIME) && defined(HAVE_NTP_ADJTIME)
int ntp_gettime(struct ntptimeval *ntv)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/87e31316f1a0824fb0bafea80f8873833346a92f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161012/8e09bc31/attachment.html>
More information about the vc
mailing list