aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2016-04-21 19:47:26 +0000
committerJohn Crispin <john@openwrt.org>2016-04-21 19:47:26 +0000
commit79c67071c6f355f3fd725f2f9a4a79ef9b97b520 (patch)
tree3d16e7f5b23280166b0a45313388f8c003f6bc9d /package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
parent5099a0d3863fdc2f92ce0b55bb47affabb6838a7 (diff)
downloadupstream-79c67071c6f355f3fd725f2f9a4a79ef9b97b520.tar.gz
upstream-79c67071c6f355f3fd725f2f9a4a79ef9b97b520.tar.bz2
upstream-79c67071c6f355f3fd725f2f9a4a79ef9b97b520.zip
xtables-addons: build: fix configure compatiblity with POSIX shells
Fixes build with /bin/sh pointing to certain versions of dash (for example on Void Linux). Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> SVN-Revision: 49218
Diffstat (limited to 'package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch')
-rw-r--r--package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch b/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
index e4101ad83a..6a7a099fcc 100644
--- a/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
+++ b/package/network/utils/xtables-addons/patches/002-fix-kernel-version-detection.patch
@@ -1,11 +1,11 @@
--- a/configure.ac
+++ b/configure.ac
-@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return
+@@ -44,7 +44,7 @@ regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
if test -n "$kbuilddir"; then
AC_MSG_CHECKING([kernel version that we will build against])
-- krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease)";
-+ krel="$(make -sC "$kbuilddir" M=$PWD kernelversion)";
- kmajor="${krel%%[[^0-9]]*}";
- kmajor="$(($kmajor+0))";
- krel="${krel:${#kmajor}}";
+- krel="$(make -sC "$kbuilddir" M=$PWD kernelrelease | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')";
++ krel="$(make -sC "$kbuilddir" M=$PWD kernelversion | $AWK -v 'FS=[[^0-9.]]' '{print $1; exit}')";
+ save_IFS=$IFS;
+ IFS='.';
+ set x $krel;