From 43713e729bf808fe95bc1ce8763535f2551bd189 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Thu, 24 Sep 2015 06:05:37 -0700 Subject: [PATCH] Bug 4323: Netfilter broken cross-includes with Linux 4.2 --- compat/os/linux.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/compat/os/linux.h b/compat/os/linux.h index b1d70df0c9..4ec0c25df7 100644 --- a/compat/os/linux.h +++ b/compat/os/linux.h @@ -29,6 +29,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. * -- 2.47.2