From: Francesco Chemolli Date: Sat, 20 Feb 2016 15:08:59 +0000 (+1300) Subject: Bug 4323: Netfilter broken cross-includes with Linux 4.2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7754bb73ef244f5a46e29f7f240f59be877a5baa;p=thirdparty%2Fsquid.git Bug 4323: Netfilter broken cross-includes with Linux 4.2 --- diff --git a/compat/os/linux.h b/compat/os/linux.h index da5111d7d8..2f1c96f340 100644 --- a/compat/os/linux.h +++ b/compat/os/linux.h @@ -21,6 +21,21 @@ #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 the kernel maintainers added + * to workaround it. + */ +#if HAVE_NETINET_IN_H +#include +#endif + /* * sys/capability.h is only needed in Linux apparently. *