From f962a32b6f0039766f56796a2ee035598f807289 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Tue, 21 Oct 2014 10:53:13 +0200 Subject: [PATCH] miniupnpd: fix musl build Signed-off-by: Steven Barth --- miniupnpd/Makefile | 2 +- miniupnpd/patches/101-musl-fixes.patch | 21 +++++++++++++++++++ .../patches/103-no-ipv6-autodetection.patch | 12 +++++------ 3 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 miniupnpd/patches/101-musl-fixes.patch diff --git a/miniupnpd/Makefile b/miniupnpd/Makefile index 4575dad..16803d4 100644 --- a/miniupnpd/Makefile +++ b/miniupnpd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=miniupnpd PKG_VERSION:=1.8.20140906 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_URL:=http://miniupnp.free.fr/files PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/miniupnpd/patches/101-musl-fixes.patch b/miniupnpd/patches/101-musl-fixes.patch new file mode 100644 index 0000000..36da566 --- /dev/null +++ b/miniupnpd/patches/101-musl-fixes.patch @@ -0,0 +1,21 @@ +--- a/miniupnpd.c ++++ b/miniupnpd.c +@@ -39,7 +39,7 @@ + #include + #if defined(sun) + #include +-#else ++#elif !defined(__linux__) + /* for BSD's sysctl */ + #include + #endif +--- a/netfilter/iptpinhole.h ++++ b/netfilter/iptpinhole.h +@@ -8,6 +8,7 @@ + #define IPTPINHOLE_H_INCLUDED + + #ifdef ENABLE_UPNPPINHOLE ++#include + + int add_pinhole(const char * ifname, + const char * rem_host, unsigned short rem_port, diff --git a/miniupnpd/patches/103-no-ipv6-autodetection.patch b/miniupnpd/patches/103-no-ipv6-autodetection.patch index acef536..61c023a 100644 --- a/miniupnpd/patches/103-no-ipv6-autodetection.patch +++ b/miniupnpd/patches/103-no-ipv6-autodetection.patch @@ -4,10 +4,9 @@ This will incorrectly detect capabilities such as ipv6 support even though it is As the OpenWRT buildsystem already passes the right compile flags, we can skip the autodetection. -diff -up miniupnpd-1.8.20140906/netfilter/Makefile.orig miniupnpd-1.8.20140906/netfilter/Makefile ---- miniupnpd-1.8.20140906/netfilter/Makefile.orig 2014-09-28 16:39:56.652296642 +0200 -+++ miniupnpd-1.8.20140906/netfilter/Makefile 2013-12-13 14:12:11.000000000 +0100 -@@ -38,6 +38,4 @@ endif +--- a/netfilter/Makefile ++++ b/netfilter/Makefile +@@ -38,8 +38,6 @@ endif endif endif @@ -16,9 +15,8 @@ diff -up miniupnpd-1.8.20140906/netfilter/Makefile.orig miniupnpd-1.8.20140906/n all: iptcrdr.o testiptcrdr iptpinhole.o \ testiptcrdr_peer testiptcrdr_dscp test_nfct_get # testiptpinhole -diff -up miniupnpd-1.8.20140906/Makefile.linux.orig miniupnpd-1.8.20140906/Makefile.linux ---- miniupnpd-1.8.20140906/Makefile.linux.orig 2014-09-28 16:46:06.781835136 +0200 -+++ miniupnpd-1.8.20140906/Makefile.linux 2014-09-28 16:46:14.388907413 +0200 +--- a/Makefile.linux ++++ b/Makefile.linux @@ -70,7 +70,6 @@ CPPFLAGS += -DIPTABLES_143 endif -- 2.30.2