summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2013-08-13 17:17:40 (GMT)
committerTobias Markmann <tm@ayena.de>2013-08-13 17:40:43 (GMT)
commit437e70ff9d254b11a30a4926010a91543d7f282c (patch)
tree123ef9476d89ad32643356ea11c52d212d2d03ad /3rdParty/LibNATPMP
parent3eefe28a2f6cc1e33d9d2b0bad7f9c6f2146352f (diff)
downloadswift-437e70ff9d254b11a30a4926010a91543d7f282c.zip
swift-437e70ff9d254b11a30a4926010a91543d7f282c.tar.bz2
Adding basic support for Android and Unbound (No IPv6 yet).
Change-Id: I1d74324515b20e0dc3d0ef4aa2f556fea7b4bee3 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.s
Diffstat (limited to '3rdParty/LibNATPMP')
-rw-r--r--3rdParty/LibNATPMP/01_android_compilation_fix.diff34
1 files changed, 34 insertions, 0 deletions
diff --git a/3rdParty/LibNATPMP/01_android_compilation_fix.diff b/3rdParty/LibNATPMP/01_android_compilation_fix.diff
new file mode 100644
index 0000000..78943aa
--- /dev/null
+++ b/3rdParty/LibNATPMP/01_android_compilation_fix.diff
@@ -0,0 +1,34 @@
+diff --git a/3rdParty/LibNATPMP/src/libnatpmp/getgateway.h b/3rdParty/LibNATPMP/src/libnatpmp/getgateway.h
+index 9432528..51dadb7 100644
+--- a/3rdParty/LibNATPMP/src/libnatpmp/getgateway.h
++++ b/3rdParty/LibNATPMP/src/libnatpmp/getgateway.h
+@@ -27,6 +27,11 @@ typedef unsigned short uint16_t;
+ #endif
+ #include "declspec.h"
+
++#ifdef ANDROID
++#include <arpa/inet.h>
++#define in_addr_t uint32_t
++#endif
++
+ /* getdefaultgateway() :
+ * return value :
+ * 0 : success
+diff --git a/3rdParty/LibNATPMP/src/libnatpmp/natpmp.h b/3rdParty/LibNATPMP/src/libnatpmp/natpmp.h
+index 1175b58..c870371 100644
+--- a/3rdParty/LibNATPMP/src/libnatpmp/natpmp.h
++++ b/3rdParty/LibNATPMP/src/libnatpmp/natpmp.h
+@@ -39,6 +39,12 @@ typedef unsigned short uint16_t;
+ #include <netinet/in.h>
+ #endif
+
++#ifdef ANDROID
++#include <arpa/inet.h>
++#define in_addr_t uint32_t
++#endif
++
++
+ typedef struct {
+ int s; /* socket */
+ in_addr_t gateway; /* default gateway (IPv4) */
+-- \ No newline at end of file