Remove UPnP support. fixes #2500

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood
2017-07-03 08:57:05 +01:00
parent d6ec3954c6
commit 506a21850a
22 changed files with 13 additions and 359 deletions

View File

@@ -1,42 +0,0 @@
From 71ce1d6dfa5424f8fe8633e23494c7638ea2c79e Mon Sep 17 00:00:00 2001
From: Thomas Bernard <miniupnp@free.fr>
Date: Thu, 10 Nov 2016 21:55:33 +0100
Subject: [PATCH] fix for Solaris 11 compilation
see #216
---
miniupnpc/Makefile | 2 ++
miniupnpc/minissdpc.c | 3 +++
2 files changed, 5 insertions(+)
diff --git a/miniupnpc/Makefile b/miniupnpc/Makefile
index 5c23000..72cdc0f 100644
--- a/miniupnpc/Makefile
+++ b/miniupnpc/Makefile
@@ -43,10 +43,12 @@ CFLAGS += -D_NETBSD_SOURCE
endif
ifneq ($(OS), FreeBSD)
ifneq ($(OS), Darwin)
+ifneq ($(OS), SunOS)
#CFLAGS += -D_POSIX_C_SOURCE=200112L
CFLAGS += -D_XOPEN_SOURCE=600
endif
endif
+endif
#CFLAGS += -ansi
# -DNO_GETADDRINFO
INSTALL = install
diff --git a/miniupnpc/minissdpc.c b/miniupnpc/minissdpc.c
index f200f07..263160e 100644
--- a/miniupnpc/minissdpc.c
+++ b/miniupnpc/minissdpc.c
@@ -73,6 +73,9 @@ struct sockaddr_un {
#if !defined(HAS_IP_MREQN) && !defined(_WIN32)
#include <sys/ioctl.h>
+#if defined(__sun)
+#include <sys/sockio.h>
+#endif
#endif
#if defined(HAS_IP_MREQN) && defined(NEED_STRUCT_IP_MREQN)

View File

@@ -1,22 +0,0 @@
From 0aa7c46227acd8ddb135c577674ad454bf2fba86 Mon Sep 17 00:00:00 2001
From: Thomas Bernard <miniupnp@free.fr>
Date: Fri, 11 Nov 2016 17:53:21 +0100
Subject: [PATCH] remove unsigned/signed comparison
---
miniupnpc/portlistingparse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/miniupnpc/portlistingparse.c b/miniupnpc/portlistingparse.c
index 1bed763..07f3f87 100644
--- a/miniupnpc/portlistingparse.c
+++ b/miniupnpc/portlistingparse.c
@@ -55,7 +55,7 @@ startelt(void * d, const char * name, int l)
pdata->curelt = PortMappingEltNone;
for(i = 0; elements[i].str; i++)
{
- if(strlen(elements[i].str) == l && memcmp(name, elements[i].str, l) == 0)
+ if(strlen(elements[i].str) == (size_t)l && memcmp(name, elements[i].str, l) == 0)
{
pdata->curelt = elements[i].code;
break;

View File

@@ -1,23 +0,0 @@
From ec1c49bb0cd5e448e6f0adee7de3a831c4869bdd Mon Sep 17 00:00:00 2001
From: Thomas Bernard <miniupnp@free.fr>
Date: Fri, 11 Nov 2016 17:24:39 +0100
Subject: [PATCH] check strlen before memcmp
1st try to fix #220
---
miniupnpc/portlistingparse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/miniupnpc/portlistingparse.c b/miniupnpc/portlistingparse.c
index 0e09278..1bed763 100644
--- a/miniupnpc/portlistingparse.c
+++ b/miniupnpc/portlistingparse.c
@@ -55,7 +55,7 @@ startelt(void * d, const char * name, int l)
pdata->curelt = PortMappingEltNone;
for(i = 0; elements[i].str; i++)
{
- if(memcmp(name, elements[i].str, l) == 0)
+ if(strlen(elements[i].str) == l && memcmp(name, elements[i].str, l) == 0)
{
pdata->curelt = elements[i].code;
break;