From f6fc52e5c0717f4c131c84a50cb15e5d21426583 Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Fri, 16 Aug 2019 13:03:17 +0800 Subject: [PATCH] nftables: Fix compilation with uClibc-ng --- package/network/utils/nftables/Makefile | 15 ++-------- .../nftables/patches/010-uclibc-ng.patch | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+), 13 deletions(-) mode change 100755 => 100644 package/network/utils/nftables/Makefile create mode 100644 package/network/utils/nftables/patches/010-uclibc-ng.patch diff --git a/package/network/utils/nftables/Makefile b/package/network/utils/nftables/Makefile old mode 100755 new mode 100644 index d1e995116d..9f5e4d16d2 --- a/package/network/utils/nftables/Makefile +++ b/package/network/utils/nftables/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nftables PKG_VERSION:=0.9.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files @@ -34,21 +34,10 @@ define Package/nftables CATEGORY:=Network SUBMENU:=Firewall TITLE:=nftables packet filtering userspace utility - DEPENDS:=+kmod-nft-core +libnftnl +PACKAGE_NFT_WITH_JSON:jansson + DEPENDS:=+kmod-nft-core +libnftnl URL:=http://netfilter.org/projects/nftables/ endef -define Package/nftables/config - config PACKAGE_NFT_WITH_JSON - bool "Build nftables with json support" - depends on PACKAGE_nftables - default n -endef - -ifeq ($(CONFIG_PACKAGE_NFT_WITH_JSON),y) -CONFIGURE_ARGS += --with-json -endif - define Package/nftables/install $(INSTALL_DIR) $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/nft $(1)/usr/sbin/ diff --git a/package/network/utils/nftables/patches/010-uclibc-ng.patch b/package/network/utils/nftables/patches/010-uclibc-ng.patch new file mode 100644 index 0000000000..760fde5186 --- /dev/null +++ b/package/network/utils/nftables/patches/010-uclibc-ng.patch @@ -0,0 +1,28 @@ +From c65c4f9998587a0c705b3635215f25fa5680c0d3 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 3 May 2019 11:49:11 -0700 +Subject: gmputil: Add missing header for va_list + +Otherwise it errors with unknown type name when using uClibc. + +Signed-off-by: Rosen Penev +Signed-off-by: Pablo Neira Ayuso +--- + include/gmputil.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/gmputil.h b/include/gmputil.h +index 73959c17..ad63d67b 100644 +--- a/include/gmputil.h ++++ b/include/gmputil.h +@@ -7,6 +7,7 @@ + #include + #else + #include ++#include + #include + /* mini-gmp doesn't come with gmp_vfprintf, so we use our own minimal variant */ + extern int mpz_vfprintf(FILE *fp, const char *format, va_list args); +-- +cgit v1.2.1 +