]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4323: Netfilter broken cross-includes with Linux 4.2
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 24 Sep 2015 13:05:37 +0000 (06:05 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 24 Sep 2015 13:05:37 +0000 (06:05 -0700)
compat/os/linux.h

index b1d70df0c99dd3cf9ffb2c9fe3ab23304c6c71e9..4ec0c25df71bda751066de3daa588ac94c3eac39 100644 (file)
 #define HAVE_RES_INIT  HAVE___RES_INIT
 #endif
 
+/*
+ * Netfilter header madness. (see Bug 4323)
+ *
+ * Netfilter have a history of defining their own versions of network protocol
+ * primitives without sufficient protection against the POSIX defines which are
+ * aways present in Linux.
+ *
+ * netinet/in.h must be included before any other sys header in order to properly
+ * activate include guards in <linux/libc-compat.h> the kernel maintainers added
+ * to workaround it.
+ */
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
 /*
  * sys/capability.h is only needed in Linux apparently.
  *