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@xxxxxxxxxxxx>
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';