summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/LibNATPMP')
-rw-r--r--3rdParty/LibNATPMP/src/libnatpmp/getgateway.c18
-rw-r--r--3rdParty/LibNATPMP/src/libnatpmp/getgateway.h8
-rw-r--r--3rdParty/LibNATPMP/src/libnatpmp/natpmp.c10
-rw-r--r--3rdParty/LibNATPMP/src/libnatpmp/natpmp.h14
4 files changed, 28 insertions, 22 deletions
diff --git a/3rdParty/LibNATPMP/src/libnatpmp/getgateway.c b/3rdParty/LibNATPMP/src/libnatpmp/getgateway.c
index 3a3f9a6..dfb9f3e 100644
--- a/3rdParty/LibNATPMP/src/libnatpmp/getgateway.c
+++ b/3rdParty/LibNATPMP/src/libnatpmp/getgateway.c
@@ -1,7 +1,7 @@
-/* $Id: getgateway.c,v 1.24 2014/03/31 12:41:35 nanard Exp $ */
+/* $Id: getgateway.c,v 1.25 2014/04/22 10:28:57 nanard Exp $ */
/* libnatpmp
-Copyright (c) 2007-2011, Thomas BERNARD
+Copyright (c) 2007-2014, Thomas BERNARD
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -67,13 +67,6 @@ POSSIBILITY OF SUCH DAMAGE.
#undef USE_SYSCTL_NET_ROUTE
#endif
-#if !defined(USE_PROC_NET_ROUTE) && !defined(USE_SOCKET_ROUTE) && !defined(USE_SYSCTL_NET_ROUTE) && !defined(WIN32)
-int getdefaultgateway(in_addr_t * addr)
-{
- return -1;
-}
-#endif
-
#ifdef WIN32
#undef USE_PROC_NET_ROUTE
#undef USE_SOCKET_ROUTE
@@ -572,4 +565,9 @@ fail:
}
#endif /* #ifdef USE_HAIKU_CODE */
-
+#if !defined(USE_PROC_NET_ROUTE) && !defined(USE_SOCKET_ROUTE) && !defined(USE_SYSCTL_NET_ROUTE) && !defined(USE_WIN32_CODE) && !defined(USE_WIN32_CODE_2) && !defined(USE_HAIKU_CODE)
+int getdefaultgateway(in_addr_t * addr)
+{
+ return -1;
+}
+#endif
diff --git a/3rdParty/LibNATPMP/src/libnatpmp/getgateway.h b/3rdParty/LibNATPMP/src/libnatpmp/getgateway.h
index da98d1a..6eb1f93 100644
--- a/3rdParty/LibNATPMP/src/libnatpmp/getgateway.h
+++ b/3rdParty/LibNATPMP/src/libnatpmp/getgateway.h
@@ -1,6 +1,6 @@
-/* $Id: getgateway.h,v 1.7 2013/09/10 20:09:04 nanard Exp $ */
+/* $Id: getgateway.h,v 1.8 2014/04/22 09:15:40 nanard Exp $ */
/* libnatpmp
-Copyright (c) 2007-2013, Thomas BERNARD
+Copyright (c) 2007-2014, Thomas BERNARD
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,7 @@ typedef unsigned short uint16_t;
#endif
#define in_addr_t uint32_t
#endif
-#include "declspec.h"
+/* #include "declspec.h" */
#ifdef ANDROID
#include <arpa/inet.h>
@@ -49,6 +49,6 @@ typedef unsigned short uint16_t;
* return value :
* 0 : success
* -1 : failure */
-LIBSPEC int getdefaultgateway(in_addr_t * addr);
+/* LIBSPEC */int getdefaultgateway(in_addr_t * addr);
#endif
diff --git a/3rdParty/LibNATPMP/src/libnatpmp/natpmp.c b/3rdParty/LibNATPMP/src/libnatpmp/natpmp.c
index a09f217..3a49812 100644
--- a/3rdParty/LibNATPMP/src/libnatpmp/natpmp.c
+++ b/3rdParty/LibNATPMP/src/libnatpmp/natpmp.c
@@ -1,6 +1,6 @@
-/* $Id: natpmp.c,v 1.18 2013/11/26 08:47:36 nanard Exp $ */
+/* $Id: natpmp.c,v 1.20 2015/05/27 12:43:15 nanard Exp $ */
/* libnatpmp
-Copyright (c) 2007-2013, Thomas BERNARD
+Copyright (c) 2007-2015, Thomas BERNARD
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -116,7 +116,7 @@ int sendpendingrequest(natpmp_t * p)
addr.sin_addr.s_addr = p->gateway;
r = (int)sendto(p->s, p->pending_request, p->pending_request_len, 0,
(struct sockaddr *)&addr, sizeof(addr));*/
- r = (int)send(p->s, p->pending_request, p->pending_request_len, 0);
+ r = (int)send(p->s, (const char *)p->pending_request, p->pending_request_len, 0);
return (r<0) ? NATPMP_ERR_SENDERR : r;
}
@@ -125,7 +125,7 @@ int sendnatpmprequest(natpmp_t * p)
int n;
if(!p)
return NATPMP_ERR_INVALIDARGS;
- /* TODO : check if no request is allready pending */
+ /* TODO : check if no request is already pending */
p->has_pending_request = 1;
p->try_number = 1;
n = sendpendingrequest(p);
@@ -204,7 +204,7 @@ LIBSPEC int readnatpmpresponse(natpmp_t * p, natpmpresp_t * response)
int n;
if(!p)
return NATPMP_ERR_INVALIDARGS;
- n = recvfrom(p->s, buf, sizeof(buf), 0,
+ n = recvfrom(p->s, (char *)buf, sizeof(buf), 0,
(struct sockaddr *)&addr, &addrlen);
if(n<0)
#ifdef WIN32
diff --git a/3rdParty/LibNATPMP/src/libnatpmp/natpmp.h b/3rdParty/LibNATPMP/src/libnatpmp/natpmp.h
index 6791c76..41325c9 100644
--- a/3rdParty/LibNATPMP/src/libnatpmp/natpmp.h
+++ b/3rdParty/LibNATPMP/src/libnatpmp/natpmp.h
@@ -1,6 +1,6 @@
-/* $Id: natpmp.h,v 1.19 2014/04/01 09:39:29 nanard Exp $ */
+/* $Id: natpmp.h,v 1.20 2014/04/22 09:15:40 nanard Exp $ */
/* libnatpmp
-Copyright (c) 2007-2013, Thomas BERNARD
+Copyright (c) 2007-2014, Thomas BERNARD
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -48,10 +48,18 @@ typedef unsigned short uint16_t;
#define in_addr_t uint32_t
#include "declspec.h"
#else /* WIN32 */
+#define LIBSPEC
#include <netinet/in.h>
#endif /* WIN32 */
-#include "declspec.h"
+/* causes problem when installing. Maybe should it be inlined ? */
+/* #include "declspec.h" */
+
+#ifdef ANDROID
+#include <arpa/inet.h>
+#define in_addr_t uint32_t
+#endif
+
#ifdef ANDROID
#include <arpa/inet.h>