[ntpsec commit] Remove detection and inclusion of netinet/ in_systm.h and netinet/ip.h.

Eric S. Raymond esr at ntpsec.org
Tue Oct 20 04:46:36 UTC 2015


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

Author:    Eric S. Raymond <esr at thyrsus.com>
Date:      Tue Oct 20 00:38:51 2015 -0400

Remove detection and inclusion of netinet/in_systm.h and netinet/ip.h.

These are not in the Open Group standard, and not required under Linux
or FreeBSD.  No code was conditioned on HAVE_NETINET_IP_H or
HAVE_NETINET_IN_SYSTM_H, just the inclusions.  So if this breaks
anyting on any target platform it should cause simple compile-time
errors due to missing definitions.

Google searches hint that these may once have been required on older
Unixes, but the definitions we require have been absorbed into the
standardized netinet/in.h header.  Note however that this change has
*not* been tested under Mac OS X.

---

 include/ntp_io.h   | 10 +---------
 pylib/configure.py |  2 --
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/include/ntp_io.h b/include/ntp_io.h
index 35f2a5c..ef3bdb5 100644
--- a/include/ntp_io.h
+++ b/include/ntp_io.h
@@ -11,6 +11,7 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <fcntl.h>
+#include <netinet/in.h>
 
 #ifdef SYS_WINNT
 # include <io.h>
@@ -19,15 +20,6 @@
 
 #include <isc/netaddr.h>
 
-#include <netinet/in.h>
-
-#if defined(HAVE_NETINET_IP_H)
-# ifdef HAVE_NETINET_IN_SYSTM_H
-#  include <netinet/in_systm.h>
-# endif
-# include <netinet/ip.h>
-#endif
-
 #include "libntp.h"	/* This needs Something above for GETDTABLESIZE */
 
 /*
diff --git a/pylib/configure.py b/pylib/configure.py
index 10d2f8a..4d9f606 100644
--- a/pylib/configure.py
+++ b/pylib/configure.py
@@ -244,14 +244,12 @@ def cmd_configure(ctx):
 		"linux/serial.h",
 		#"linux/seccomp.h",	- Doesn't build yet, investigate
 		"machine/soundcard.h",
-		("netinet/in_systm.h", ["sys/types.h","netinet/in.h"]),
 		("md5.h", ["sys/types.h"]),
 		"net/if6.h",
 		"net/if_var.h",
 		("net/route.h", ["sys/socket.h","net/if.h","net/route.h"]),
 		"netinet/in_var.h",
 		"netinfo/ni.h",
-		"netinet/ip.h",
 		"priv.h",
 		("readline/readline.h",["stdio.h"]),
 		("readline/history.h", ["stdio.h","readline/readline.h"]),



More information about the vc mailing list