Blame SOURCES/squid-4.11-include-guards.patch

3921f5
diff --git a/compat/os/linux.h b/compat/os/linux.h
3921f5
index 0ff05c6..d51389b 100644
3921f5
--- a/compat/os/linux.h
3921f5
+++ b/compat/os/linux.h
3921f5
@@ -44,6 +44,36 @@
3921f5
 #include <netinet/in.h>
3921f5
 #endif
3921f5
 
3921f5
+/*
3921f5
+ * Netfilter header madness. (see Bug 4323)
3921f5
+ *
3921f5
+ * Netfilter have a history of defining their own versions of network protocol
3921f5
+ * primitives without sufficient protection against the POSIX defines which are
3921f5
+ * aways present in Linux.
3921f5
+ *
3921f5
+ * netinet/in.h must be included before any other sys header in order to properly
3921f5
+ * activate include guards in <linux/libc-compat.h> the kernel maintainers added
3921f5
+ * to workaround it.
3921f5
+ */
3921f5
+#if HAVE_NETINET_IN_H
3921f5
+#include <netinet/in.h>
3921f5
+#endif
3921f5
+
3921f5
+/*
3921f5
+ * Netfilter header madness. (see Bug 4323)
3921f5
+ *
3921f5
+ * Netfilter have a history of defining their own versions of network protocol
3921f5
+ * primitives without sufficient protection against the POSIX defines which are
3921f5
+ * aways present in Linux.
3921f5
+ *
3921f5
+ * netinet/in.h must be included before any other sys header in order to properly
3921f5
+ * activate include guards in <linux/libc-compat.h> the kernel maintainers added
3921f5
+ * to workaround it.
3921f5
+ */
3921f5
+#if HAVE_NETINET_IN_H
3921f5
+#include <netinet/in.h>
3921f5
+#endif
3921f5
+
3921f5
 /*
3921f5
  * sys/capability.h is only needed in Linux apparently.
3921f5
  *