aboutsummaryrefslogtreecommitdiff
path: root/external/miniupnpc/miniupnpc.c
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2014-10-02 18:43:13 +0200
committerRiccardo Spagni <ric@spagni.net>2014-10-02 18:54:55 +0200
commit18281f4d205d9e320fad23ac3c28b66ea4bb2ff7 (patch)
treef007a38c98ad2f8d6e7b3cd85230b0ce4c5fcf02 /external/miniupnpc/miniupnpc.c
parentfixed unbound static lib on mingw as libunbound.dll.a (diff)
downloadmonero-18281f4d205d9e320fad23ac3c28b66ea4bb2ff7.tar.xz
remove dangling upnp port mappings, updated miniupnpc
Diffstat (limited to '')
-rw-r--r--[-rwxr-xr-x]external/miniupnpc/miniupnpc.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/external/miniupnpc/miniupnpc.c b/external/miniupnpc/miniupnpc.c
index f661c2e6f..1da230f52 100755..100644
--- a/external/miniupnpc/miniupnpc.c
+++ b/external/miniupnpc/miniupnpc.c
@@ -1,4 +1,4 @@
-/* $Id: miniupnpc.c,v 1.117 2014/01/31 14:19:13 nanard Exp $ */
+/* $Id: miniupnpc.c,v 1.116 2014/01/31 14:09:03 nanard Exp $ */
/* Project : miniupnp
* Web : http://miniupnp.free.fr/
* Author : Thomas BERNARD
@@ -6,7 +6,7 @@
* This software is subjet to the conditions detailed in the
* provided LICENSE file. */
#define __EXTENSIONS__ 1
-#if !defined(MACOSX) && !defined(__sun)
+#if !defined(__APPLE__) && !defined(__sun)
#if !defined(_XOPEN_SOURCE) && !defined(__OpenBSD__) && !defined(__NetBSD__)
#ifndef __cplusplus
#define _XOPEN_SOURCE 600
@@ -17,7 +17,7 @@
#endif
#endif
-#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(MACOSX) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun)
+#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__)
#define HAS_IP_MREQN
#endif
@@ -70,6 +70,9 @@
/* Amiga OS specific stuff */
#define TIMEVAL struct timeval
#endif
+#ifdef __GNU__
+#define MAXHOSTNAMELEN 64
+#endif
#if defined(HAS_IP_MREQN) && defined(NEED_STRUCT_IP_MREQN)
@@ -106,7 +109,7 @@ struct ip_mreqn
#define SERVICEPREFIX2 'u'
/* root description parsing */
-LIBSPEC void parserootdesc(const char * buffer, int bufsize, struct IGDdatas * data)
+MINIUPNP_LIBSPEC void parserootdesc(const char * buffer, int bufsize, struct IGDdatas * data)
{
struct xmlparser parser;
/* xmlparser object */
@@ -335,7 +338,7 @@ parseMSEARCHReply(const char * reply, int size,
* no devices was found.
* It is up to the caller to free the chained list
* delay is in millisecond (poll) */
-LIBSPEC struct UPNPDev *
+MINIUPNP_LIBSPEC struct UPNPDev *
upnpDiscover(int delay, const char * multicastif,
const char * minissdpdsock, int sameport,
int ipv6,
@@ -718,7 +721,7 @@ upnpDiscover(int delay, const char * multicastif,
/* freeUPNPDevlist() should be used to
* free the chained list returned by upnpDiscover() */
-LIBSPEC void freeUPNPDevlist(struct UPNPDev * devlist)
+MINIUPNP_LIBSPEC void freeUPNPDevlist(struct UPNPDev * devlist)
{
struct UPNPDev * next;
while(devlist)
@@ -754,7 +757,7 @@ url_cpy_or_cat(char * dst, const char * src, int n)
/* Prepare the Urls for usage...
*/
-LIBSPEC void
+MINIUPNP_LIBSPEC void
GetUPNPUrls(struct UPNPUrls * urls, struct IGDdatas * data,
const char * descURL, unsigned int scope_id)
{
@@ -844,7 +847,7 @@ GetUPNPUrls(struct UPNPUrls * urls, struct IGDdatas * data,
#endif
}
-LIBSPEC void
+MINIUPNP_LIBSPEC void
FreeUPNPUrls(struct UPNPUrls * urls)
{
if(!urls)
@@ -891,7 +894,7 @@ UPNPIGD_IsConnected(struct UPNPUrls * urls, struct IGDdatas * data)
* passed as parameters are set. Donc forget to call FreeUPNPUrls(urls) to
* free allocated memory.
*/
-LIBSPEC int
+MINIUPNP_LIBSPEC int
UPNP_GetValidIGD(struct UPNPDev * devlist,
struct UPNPUrls * urls,
struct IGDdatas * data,