[ntpsec commit] Improve portability back to NetBSD and older FreeBSD.

Eric S. Raymond esr at ntpsec.org
Wed Oct 21 00:17:23 UTC 2015


Module:    ntpsec
Branch:    master
Commit:    7f8706008c21d9a1362a96b96c60ec651bbd3e03
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=7f8706008c21d9a1362a96b96c60ec651bbd3e03

Author:    Eric S. Raymond <esr at thyrsus.com>
Date:      Tue Oct 20 20:17:13 2015 -0400

Improve portability back to NetBSD and older FreeBSD.

---

 libntp/machines.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libntp/machines.c b/libntp/machines.c
index 5e0681b..a7dfbc4 100644
--- a/libntp/machines.c
+++ b/libntp/machines.c
@@ -4,8 +4,15 @@
  *
  */
 
+#include <unistd.h>
+
 #include "config.h"
 
+#ifdef HAVE_SYS_TIMEX_H
+# include <sys/time.h>	/* prerequisite on NetBSD */
+# include <sys/timex.h>
+#endif
+
 #include "ntp.h"
 #include "ntp_machine.h"
 #include "ntp_syslog.h"
@@ -14,7 +21,6 @@
 #include "lib_strbuf.h"
 #include "ntp_debug.h"
 #include "ntp_syscall.h"
-#include <unistd.h>
 
 #ifdef SYS_WINNT
 int _getch(void);	/* Declare the one function rather than include conio.h */



More information about the vc mailing list