Patchwork iptables: additional include path required after UAPI changes

login
register
mail settings
Submitter Phil Oester
Date July 21, 2013, 3:30 p.m.
Message ID <20130721153049.GA8444@linuxace.com>
Download mbox | patch
Permalink /patch/260528/
State Accepted
Headers show

Comments

Phil Oester - July 21, 2013, 3:30 p.m.
After kernel commit 607ca46e (UAPI: (Scripted) Disintegrate include/linux),
using the "--with-kernel" argument to build iptables stopped working due
to the missing #ifdefs in the original files.  We need to make sure the
UAPI include dir is listed before the original location.  Leaving both
allows support for old and new kernels.

This fixes bug #833.

Phil

Signed-off-by: Phil Oester <kernel@linuxace.com>
Pablo Neira - July 24, 2013, 6:44 p.m.
On Sun, Jul 21, 2013 at 08:30:49AM -0700, Phil Oester wrote:
> After kernel commit 607ca46e (UAPI: (Scripted) Disintegrate include/linux),
> using the "--with-kernel" argument to build iptables stopped working due
> to the missing #ifdefs in the original files.  We need to make sure the
> UAPI include dir is listed before the original location.  Leaving both
> allows support for old and new kernels.
> 
> This fixes bug #833.

Applied, thanks Phil.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/configure.ac b/configure.ac
index be216b0..5ed5165 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,10 +114,10 @@  regular_CPPFLAGS="${largefile_cppflags} -D_REENTRANT \
 	-DXTABLES_LIBDIR=\\\"\${xtlibdir}\\\" -DXTABLES_INTERNAL";
 kinclude_CPPFLAGS="";
 if [[ -n "$kbuilddir" ]]; then
-	kinclude_CPPFLAGS="$kinclude_CPPFLAGS -I$kbuilddir/include";
+	kinclude_CPPFLAGS="$kinclude_CPPFLAGS -I$kbuilddir/include/uapi -I$kbuilddir/include";
 fi;
 if [[ -n "$ksourcedir" ]]; then
-	kinclude_CPPFLAGS="$kinclude_CPPFLAGS -I$ksourcedir/include";
+	kinclude_CPPFLAGS="$kinclude_CPPFLAGS -I$ksourcedir/include/uapi -I$ksourcedir/include";
 fi;
 pkgdatadir='${datadir}/xtables';