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

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