miniupnpd: fix musl build

Signed-off-by: Steven Barth <steven@midlink.org>
This commit is contained in:
Steven Barth 2014-10-21 10:53:13 +02:00
parent 10fd030ef4
commit f962a32b6f
3 changed files with 27 additions and 8 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=miniupnpd PKG_NAME:=miniupnpd
PKG_VERSION:=1.8.20140906 PKG_VERSION:=1.8.20140906
PKG_RELEASE:=2 PKG_RELEASE:=3
PKG_SOURCE_URL:=http://miniupnp.free.fr/files PKG_SOURCE_URL:=http://miniupnp.free.fr/files
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

View file

@ -0,0 +1,21 @@
--- a/miniupnpd.c
+++ b/miniupnpd.c
@@ -39,7 +39,7 @@
#include <sys/param.h>
#if defined(sun)
#include <kstat.h>
-#else
+#elif !defined(__linux__)
/* for BSD's sysctl */
#include <sys/sysctl.h>
#endif
--- a/netfilter/iptpinhole.h
+++ b/netfilter/iptpinhole.h
@@ -8,6 +8,7 @@
#define IPTPINHOLE_H_INCLUDED
#ifdef ENABLE_UPNPPINHOLE
+#include <sys/types.h>
int add_pinhole(const char * ifname,
const char * rem_host, unsigned short rem_port,

View file

@ -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. 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 --- a/netfilter/Makefile
--- miniupnpd-1.8.20140906/netfilter/Makefile.orig 2014-09-28 16:39:56.652296642 +0200 +++ b/netfilter/Makefile
+++ miniupnpd-1.8.20140906/netfilter/Makefile 2013-12-13 14:12:11.000000000 +0100 @@ -38,8 +38,6 @@ endif
@@ -38,6 +38,4 @@ endif
endif 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 \ all: iptcrdr.o testiptcrdr iptpinhole.o \
testiptcrdr_peer testiptcrdr_dscp test_nfct_get testiptcrdr_peer testiptcrdr_dscp test_nfct_get
# testiptpinhole # testiptpinhole
diff -up miniupnpd-1.8.20140906/Makefile.linux.orig miniupnpd-1.8.20140906/Makefile.linux --- a/Makefile.linux
--- miniupnpd-1.8.20140906/Makefile.linux.orig 2014-09-28 16:46:06.781835136 +0200 +++ b/Makefile.linux
+++ miniupnpd-1.8.20140906/Makefile.linux 2014-09-28 16:46:14.388907413 +0200
@@ -70,7 +70,6 @@ CPPFLAGS += -DIPTABLES_143 @@ -70,7 +70,6 @@ CPPFLAGS += -DIPTABLES_143
endif endif