Skip to contentSkip to conversation

Do not include net/in_systm.h

PATCH In review Frank Lichtenheld 2 participants 2 messages Mar 30, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Do not include net/in_systm.h

This only defines three types and none of them is
used anywhere in our source code.

---
 configure.ac          |  5 +----
 src/openvpn/syshead.h | 16 ----------------
 2 files changed, 1 insertion(+), 20 deletions(-)

Suggested by Arne in his CMake patch.
Confirmed and tested.

configure.ac +1 -4
index ca85e5ed..e1e79ebf 100644
@@ -453,7 +453,7 @@ AC_CHECK_HEADERS([ \
 	fcntl.h io.h \
 	sys/types.h sys/socket.h \
 	unistd.h dlfcn.h \
-	netinet/in.h netinet/in_systm.h \
+	netinet/in.h \
 	netinet/tcp.h arpa/inet.h netdb.h \
 	versionhelpers.h \
 ])
@@ -489,9 +489,6 @@ SOCKET_INCLUDES="
 #ifdef _WIN32
 #include <ws2tcpip.h>
 #endif
-#ifdef HAVE_NETINET_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif
 #ifdef HAVE_NETINET_IP_H
 #include <netinet/ip.h>
 #endif
src/openvpn/syshead.h +0 -16
index 53359225..7181b94d 100644
@@ -221,10 +221,6 @@
 #include <sys/sockio.h>
 #endif
 
-#ifdef HAVE_NETINET_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif
-
 #ifdef HAVE_NETINET_IP_H
 #include <netinet/ip.h>
 #endif
@@ -241,10 +237,6 @@
 #include <sys/uio.h>
 #endif
 
-#ifdef HAVE_NETINET_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif
-
 #ifdef HAVE_NETINET_IP_H
 #include <netinet/ip.h>
 #endif
@@ -265,10 +257,6 @@
 #include <sys/uio.h>
 #endif
 
-#ifdef HAVE_NETINET_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif
-
 #ifdef HAVE_NETINET_IP_H
 #include <netinet/ip.h>
 #endif
@@ -301,10 +289,6 @@
 #include <sys/uio.h>
 #endif
 
-#ifdef HAVE_NETINET_IN_SYSTM_H
-#include <netinet/in_systm.h>
-#endif
-
 #ifdef HAVE_NETINET_IP_H
 #include <netinet/ip.h>
 #endif
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw

"Buildbot says it still compiles on ALL platforms!" - and that is all I would have tested anyway (Buildbot isn't testing AIX, but I am reasonably sure AIX does not need that either).

This is refactoring / code cleanup, which goes to master (only), unless needed for a bugfix.

Your patch has been applied to the master branch.

commit dbd7e3bea41e8be3fa637a17827236b1fc6db18b

Author: Frank Lichtenheld
Date:   Thu Mar 30 11:42:15 2023 +0200
     Do not include net/in_systm.h

     Signed-off-by: Frank Lichtenheld <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg26559.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering