From 97551f28e3642faeff0ae77dde48cbd03cee3f1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Sun, 13 Oct 2013 14:45:33 +0200
Subject: Apply MiniUPNP and NatPMP Android patches

Change-Id: Iaa8c564f21d1f7354f597ceca478e52fae6c774e

diff --git a/3rdParty/LibMiniUPnPc/src/miniupnpc/miniwget.c b/3rdParty/LibMiniUPnPc/src/miniupnpc/miniwget.c
index 87f6155..0c31416 100644
--- a/3rdParty/LibMiniUPnPc/src/miniupnpc/miniwget.c
+++ b/3rdParty/LibMiniUPnPc/src/miniupnpc/miniwget.c
@@ -44,6 +44,10 @@
 #define MIN(x,y) (((x)<(y))?(x):(y))
 #endif
 
+#ifdef __ANDROID__
+#define MIN(x,y) (((x)<(y))?(x):(y))
+#endif
+
 #include "miniupnpcstrings.h"
 #include "miniwget.h"
 #include "connecthostport.h"
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) */
-- 
cgit v0.10.2-6-g49f6