]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
GP ESP: extra headers must be explicitly included for IP packet munging on *BSD
authorDaniel Lenski <dlenski@gmail.com>
Sat, 5 Jan 2019 00:19:46 +0000 (16:19 -0800)
committerDaniel Lenski <dlenski@gmail.com>
Sat, 5 Jan 2019 01:55:27 +0000 (17:55 -0800)
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
gpst.c

diff --git a/gpst.c b/gpst.c
index a9ef565f4499a2332fdb35a0b441ea61424a9e56..635ff1eec275fbf4a6e46df965a3d752fae9bd34 100644 (file)
--- a/gpst.c
+++ b/gpst.c
 #include <lz4.h>
 #endif
 
-#ifdef __FreeBSD__
-#include <sys/types.h>
-#include <netinet/in.h>
-#endif
-
 #ifdef _WIN32
 #include "win32-ipicmp.h"
 #else
+/* The BSDs require the first two headers before netinet/ip.h
+ * (Linux and macOS already #include them within netinet/ip.h)
+ */
+#include <sys/types.h>
+#include <netinet/in.h>
 #include <netinet/ip.h>
 #include <netinet/ip_icmp.h>
 #endif