diff options
author | Steven Barth <steven@midlink.org> | 2014-10-06 06:24:53 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-10-06 06:24:53 +0000 |
commit | 415543620a1d6b57d9f561268ed93a12ad190b10 (patch) | |
tree | a33b32da4b8036e472882ec1094fe41e461e93c5 /package/network/utils/nftables/patches/101-build-allow-disabling-libreadline-support.patch | |
parent | fef66999f849771f087869f715e1adb94580cc04 (diff) | |
download | upstream-415543620a1d6b57d9f561268ed93a12ad190b10.tar.gz upstream-415543620a1d6b57d9f561268ed93a12ad190b10.tar.bz2 upstream-415543620a1d6b57d9f561268ed93a12ad190b10.zip |
nftables: bump to 2014-09-30, disable gmp
Signed-off-by: Steven Barth <steven@midlink.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42802 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils/nftables/patches/101-build-allow-disabling-libreadline-support.patch')
-rw-r--r-- | package/network/utils/nftables/patches/101-build-allow-disabling-libreadline-support.patch | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/package/network/utils/nftables/patches/101-build-allow-disabling-libreadline-support.patch b/package/network/utils/nftables/patches/101-build-allow-disabling-libreadline-support.patch new file mode 100644 index 0000000000..5219759a34 --- /dev/null +++ b/package/network/utils/nftables/patches/101-build-allow-disabling-libreadline-support.patch @@ -0,0 +1,63 @@ +From ace4c5eb69ee7dace955acdb23e30e8229b18619 Mon Sep 17 00:00:00 2001 +From: Steven Barth <cyrus@openwrt.org> +Date: Wed, 1 Oct 2014 22:40:31 +0200 +Subject: [PATCH 1/2] build: allow disabling libreadline-support + +This makes nftables a bit more embedded-friendly. + +Signed-off-by: Steven Barth <cyrus@openwrt.org> +--- + configure.ac | 11 +++++++++-- + src/Makefile.in | 2 ++ + src/main.c | 6 ++++++ + 3 files changed, 17 insertions(+), 2 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -71,8 +71,15 @@ AC_CHECK_LIB([nftnl], [nft_rule_alloc], + AC_CHECK_LIB([gmp], [__gmpz_init], , + AC_MSG_ERROR([No suitable version of libgmp found])) + +-AC_CHECK_LIB([readline], [readline], , +- AC_MSG_ERROR([No suitable version of libreadline found])) ++ ++AC_ARG_WITH([libreadline], [AS_HELP_STRING([--without-libreadline], ++ [Disable libreadline support (no interactive CLI)])], [], ++ [with_libreadline=yes]) ++AS_IF([test "x$with_libreadline" != xno], [ ++AC_CHECK_LIB([readline],[readline], , AC_MSG_ERROR([No suitable version of libreadline found])) ++]) ++AC_SUBST(with_libreadline) ++ + + # Checks for header files. + AC_HEADER_STDC +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -3,7 +3,9 @@ PROGRAMS += nft + nft-destdir := @sbindir@ + + nft-obj += main.o ++ifeq (@with_libreadline@,yes) + nft-obj += cli.o ++endif + nft-obj += rule.o + nft-obj += statement.o + nft-obj += datatype.o +--- a/src/main.c ++++ b/src/main.c +@@ -335,8 +335,14 @@ int main(int argc, char * const *argv) + if (scanner_read_file(scanner, filename, &internal_location) < 0) + goto out; + } else if (interactive) { ++#ifdef HAVE_LIBREADLINE + cli_init(&state); + return 0; ++#else ++ fprintf(stderr, "%s: interactive CLI not supported in this build\n", ++ argv[0]); ++ exit(NFT_EXIT_FAILURE); ++#endif + } else { + fprintf(stderr, "%s: no command specified\n", argv[0]); + exit(NFT_EXIT_FAILURE); |