]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - compat/os/linux.h
SourceFormat Enforcement
[thirdparty/squid.git] / compat / os / linux.h
index da5111d7d8f6fb3797b0471f04513cfe4e4056da..1ab0df5aab6f9f5b552801f6924ace67a751dc43 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
+ */
+
 #ifndef SQUID_OS_LINUX_H
 #define SQUID_OS_LINUX_H
 
 #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.
  *
@@ -64,3 +87,4 @@ typedef uint32_t __u32;
 
 #endif /* _SQUID_LINUX_ */
 #endif /* SQUID_OS_LINUX_H */
+