aboutsummaryrefslogtreecommitdiff
path: root/external/miniupnpc
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-09-17 17:39:06 +0200
committerRiccardo Spagni <ric@spagni.net>2016-09-17 17:39:06 +0200
commit77224bbf4842f3c7fb53ad7685f45cf768f5ec38 (patch)
tree18da9d2a85b71038268b80333f3c27a116b6a3a3 /external/miniupnpc
parentMerge pull request #1083 (diff)
parentremove errant target_link_libraries (diff)
downloadmonero-77224bbf4842f3c7fb53ad7685f45cf768f5ec38.tar.xz
Merge pull request #1084
5850122 remove errant target_link_libraries (Riccardo Spagni) 58abc09 don't build any miniupnpc executables (Riccardo Spagni) 114e368 don't build miniupnpc test executables (Riccardo Spagni) bb69371 updated miniupnp (Riccardo Spagni) f62ebc5 update rapidjson (Riccardo Spagni)
Diffstat (limited to 'external/miniupnpc')
-rw-r--r--external/miniupnpc/CMakeLists.txt43
-rw-r--r--external/miniupnpc/Changelog.txt4
-rw-r--r--external/miniupnpc/Makefile9
-rw-r--r--external/miniupnpc/README5
-rw-r--r--external/miniupnpc/VERSION2
-rw-r--r--external/miniupnpc/minissdpc.c3
-rw-r--r--external/miniupnpc/miniupnpc.h4
7 files changed, 45 insertions, 25 deletions
diff --git a/external/miniupnpc/CMakeLists.txt b/external/miniupnpc/CMakeLists.txt
index fd75f9ff5..1d6572ba6 100644
--- a/external/miniupnpc/CMakeLists.txt
+++ b/external/miniupnpc/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 2.6)
project (miniupnpc C)
-set (MINIUPNPC_VERSION 1.9)
+set (MINIUPNPC_VERSION 2.0)
set (MINIUPNPC_API_VERSION 16)
# - we comment out this block as we don't support these other build types
@@ -20,9 +20,7 @@ endif()
option (UPNPC_BUILD_STATIC "Build static library" TRUE)
option (UPNPC_BUILD_SHARED "Build shared library" FALSE)
-if (NOT WIN32)
- option (UPNPC_BUILD_TESTS "Build test executables" FALSE)
-endif (NOT WIN32)
+option (UPNPC_BUILD_TESTS "Build test executables" FALSE)
option (NO_GETADDRINFO "Define NO_GETADDRINFO" FALSE)
mark_as_advanced (NO_GETADDRINFO)
@@ -34,6 +32,10 @@ endif (NO_GETADDRINFO)
if (NOT WIN32)
add_definitions (-DMINIUPNPC_SET_SOCKET_TIMEOUT)
add_definitions (-D_BSD_SOURCE -D_DEFAULT_SOURCE)
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ # add_definitions (-D_POSIX_C_SOURCE=200112L)
+ add_definitions (-D_XOPEN_SOURCE=600)
+ endif (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
else (NOT WIN32)
add_definitions (-D_WIN32_WINNT=0x0501) # XP or higher for getnameinfo and friends
endif (NOT WIN32)
@@ -68,8 +70,8 @@ if (CMAKE_COMPILER_IS_GNUC)
endif ()
endif()
-configure_file (miniupnpcstrings.h.cmake ${CMAKE_BINARY_DIR}/miniupnpcstrings.h)
-include_directories (${CMAKE_BINARY_DIR})
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/miniupnpcstrings.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h)
+include_directories (${CMAKE_CURRENT_BINARY_DIR})
set (MINIUPNPC_SOURCES
igd_desc_parse.c
@@ -78,7 +80,6 @@ set (MINIUPNPC_SOURCES
minisoap.c
minissdpc.c
miniwget.c
- upnpc.c
upnpcommands.c
upnpdev.c
upnpreplyparse.c
@@ -117,21 +118,25 @@ if (NOT UPNPC_BUILD_STATIC AND NOT UPNPC_BUILD_SHARED)
endif (NOT UPNPC_BUILD_STATIC AND NOT UPNPC_BUILD_SHARED)
if (UPNPC_BUILD_STATIC)
- add_library (upnpc-static STATIC ${MINIUPNPC_SOURCES})
- set_target_properties (upnpc-static PROPERTIES OUTPUT_NAME "miniupnpc")
- target_link_libraries (upnpc-static ${LDLIBS})
- set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} upnpc-static)
- set (UPNPC_LIBRARY_TARGET upnpc-static)
+ add_library (libminiupnpc-static STATIC ${MINIUPNPC_SOURCES})
+ set_target_properties (libminiupnpc-static PROPERTIES OUTPUT_NAME "miniupnpc")
+ target_link_libraries (libminiupnpc-static ${LDLIBS})
+ set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} libminiupnpc-static)
+ set (UPNPC_LIBRARY_TARGET libminiupnpc-static)
+ # add_executable (upnpc-static upnpc.c)
+ # target_link_libraries (upnpc-static LINK_PRIVATE libminiupnpc-static)
endif (UPNPC_BUILD_STATIC)
if (UPNPC_BUILD_SHARED)
- add_library (upnpc-shared SHARED ${MINIUPNPC_SOURCES})
- set_target_properties (upnpc-shared PROPERTIES OUTPUT_NAME "miniupnpc")
- set_target_properties (upnpc-shared PROPERTIES VERSION ${MINIUPNPC_VERSION})
- set_target_properties (upnpc-shared PROPERTIES SOVERSION ${MINIUPNPC_API_VERSION})
- target_link_libraries (upnpc-shared ${LDLIBS})
- set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} upnpc-shared)
- set (UPNPC_LIBRARY_TARGET upnpc-shared)
+ add_library (libminiupnpc-shared SHARED ${MINIUPNPC_SOURCES})
+ set_target_properties (libminiupnpc-shared PROPERTIES OUTPUT_NAME "miniupnpc")
+ set_target_properties (libminiupnpc-shared PROPERTIES VERSION ${MINIUPNPC_VERSION})
+ set_target_properties (libminiupnpc-shared PROPERTIES SOVERSION ${MINIUPNPC_API_VERSION})
+ target_link_libraries (libminiupnpc-shared ${LDLIBS})
+ set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} libminiupnpc-shared)
+ set (UPNPC_LIBRARY_TARGET libminiupnpc-shared)
+ add_executable (upnpc-shared upnpc.c)
+ target_link_libraries (upnpc-shared LINK_PRIVATE libminiupnpc-shared)
endif (UPNPC_BUILD_SHARED)
if (UPNPC_BUILD_TESTS)
diff --git a/external/miniupnpc/Changelog.txt b/external/miniupnpc/Changelog.txt
index bf6343bd2..078bebce3 100644
--- a/external/miniupnpc/Changelog.txt
+++ b/external/miniupnpc/Changelog.txt
@@ -1,6 +1,8 @@
-$Id: Changelog.txt,v 1.222 2016/01/24 17:24:35 nanard Exp $
+$Id: Changelog.txt,v 1.223 2016/04/19 21:06:20 nanard Exp $
miniUPnP client Changelog.
+VERSION 2.0 : released 2016/04/19
+
2016/01/24:
change miniwget to return HTTP status code
increments API_VERSION to 16
diff --git a/external/miniupnpc/Makefile b/external/miniupnpc/Makefile
index 99a69301c..b7826caa1 100644
--- a/external/miniupnpc/Makefile
+++ b/external/miniupnpc/Makefile
@@ -38,6 +38,9 @@ CFLAGS += -DMINIUPNPC_SET_SOCKET_TIMEOUT
CFLAGS += -DMINIUPNPC_GET_SRC_ADDR
CFLAGS += -D_BSD_SOURCE
CFLAGS += -D_DEFAULT_SOURCE
+ifeq ($(OS), NetBSD)
+CFLAGS += -D_NETBSD_SOURCE
+endif
ifneq ($(OS), FreeBSD)
ifneq ($(OS), Darwin)
#CFLAGS += -D_POSIX_C_SOURCE=200112L
@@ -136,7 +139,11 @@ endif
LIBDIR ?= lib
# install directories
-INSTALLPREFIX ?= $(PREFIX)/usr
+ifeq ($(strip $(PREFIX)),)
+INSTALLPREFIX ?= /usr
+else
+INSTALLPREFIX ?= $(PREFIX)
+endif
INSTALLDIRINC = $(INSTALLPREFIX)/include/miniupnpc
INSTALLDIRLIB = $(INSTALLPREFIX)/$(LIBDIR)
INSTALLDIRBIN = $(INSTALLPREFIX)/bin
diff --git a/external/miniupnpc/README b/external/miniupnpc/README
index ab08de942..91535dbc8 100644
--- a/external/miniupnpc/README
+++ b/external/miniupnpc/README
@@ -3,7 +3,7 @@ Project web page: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
github: https://github.com/miniupnp/miniupnp
freecode: http://freecode.com/projects/miniupnp
Author: Thomas Bernard
-Copyright (c) 2005-2014 Thomas Bernard
+Copyright (c) 2005-2016 Thomas Bernard
This software is subject to the conditions detailed in the
LICENSE file provided within this distribution.
@@ -32,6 +32,7 @@ To use the libminiupnpc in your application, link it with
libminiupnpc.a (or .so) and use the following functions found in miniupnpc.h,
upnpcommands.h and miniwget.h :
- upnpDiscover()
+- UPNP_GetValidIGD()
- miniwget()
- parserootdesc()
- GetUPNPUrls()
@@ -59,3 +60,5 @@ send me an email !
For any question, you can use the web forum :
http://miniupnp.tuxfamily.org/forum/
+Bugs should be reported on github :
+https://github.com/miniupnp/miniupnp/issues
diff --git a/external/miniupnpc/VERSION b/external/miniupnpc/VERSION
index 2e0e38c63..cd5ac039d 100644
--- a/external/miniupnpc/VERSION
+++ b/external/miniupnpc/VERSION
@@ -1 +1 @@
-1.9
+2.0
diff --git a/external/miniupnpc/minissdpc.c b/external/miniupnpc/minissdpc.c
index a6380dfd4..dc4f94702 100644
--- a/external/miniupnpc/minissdpc.c
+++ b/external/miniupnpc/minissdpc.c
@@ -11,6 +11,9 @@
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
+#if defined (__NetBSD__)
+#include <net/if.h>
+#endif
#if defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__)
#ifdef _WIN32
#include <winsock2.h>
diff --git a/external/miniupnpc/miniupnpc.h b/external/miniupnpc/miniupnpc.h
index 5e8248850..0b5b47329 100644
--- a/external/miniupnpc/miniupnpc.h
+++ b/external/miniupnpc/miniupnpc.h
@@ -1,4 +1,4 @@
-/* $Id: miniupnpc.h,v 1.49 2016/01/24 17:24:36 nanard Exp $ */
+/* $Id: miniupnpc.h,v 1.50 2016/04/19 21:06:21 nanard Exp $ */
/* Project: miniupnp
* http://miniupnp.free.fr/
* Author: Thomas Bernard
@@ -19,7 +19,7 @@
#define UPNPDISCOVER_MEMORY_ERROR (-102)
/* versions : */
-#define MINIUPNPC_VERSION "1.9"
+#define MINIUPNPC_VERSION "2.0"
#define MINIUPNPC_API_VERSION 16
/* Source port: