forked from hasufell/hasufell-repository
games-strategy/s25rttr: fix building against latest miniupnpc
This commit is contained in:
parent
d84258082d
commit
96c6df66af
@ -0,0 +1,40 @@
|
|||||||
|
From baefdbc828a0b057f165c4a6f2ecb5b1641b9f70 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Julian Ospald <hasufell@posteo.de>
|
||||||
|
Date: Thu, 29 Dec 2016 20:13:27 +0100
|
||||||
|
Subject: [PATCH] Backport from 3b08b907235c09ab84e3bb23d1e05fe5a1d1c00e
|
||||||
|
|
||||||
|
---
|
||||||
|
libutil/src/UPnP.cpp | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/libutil/src/UPnP.cpp b/libutil/src/UPnP.cpp
|
||||||
|
index 8491f21..055029c 100644
|
||||||
|
--- a/libutil/src/UPnP.cpp
|
||||||
|
+++ b/libutil/src/UPnP.cpp
|
||||||
|
@@ -210,7 +210,11 @@ bool UPnP::OpenPort(const unsigned short& port)
|
||||||
|
UPNPDev* devicelist = NULL;
|
||||||
|
#ifdef UPNPDISCOVER_SUCCESS
|
||||||
|
int upnperror = 0;
|
||||||
|
+#if (MINIUPNPC_API_VERSION >= 14) /* miniUPnPc API version 14 adds TTL parameter */
|
||||||
|
+ devicelist = upnpDiscover(2000, NULL, NULL, 0, 0 /* ipv6 */, 2, &upnperror);
|
||||||
|
+#else
|
||||||
|
devicelist = upnpDiscover(2000, NULL, NULL, 0, 0 /* ipv6 */, &upnperror);
|
||||||
|
+#endif
|
||||||
|
#else
|
||||||
|
devicelist = upnpDiscover(2000, NULL, NULL, 0);
|
||||||
|
#endif
|
||||||
|
@@ -276,7 +280,11 @@ void UPnP::ClosePort()
|
||||||
|
UPNPDev* devicelist = NULL;
|
||||||
|
#ifdef UPNPDISCOVER_SUCCESS
|
||||||
|
int upnperror = 0;
|
||||||
|
+#if (MINIUPNPC_API_VERSION >= 14) /* miniUPnPc API version 14 adds TTL parameter */
|
||||||
|
+ devicelist = upnpDiscover(2000, NULL, NULL, 0, 0 /* ipv6 */, 2, &upnperror);
|
||||||
|
+#else
|
||||||
|
devicelist = upnpDiscover(2000, NULL, NULL, 0, 0 /* ipv6 */, &upnperror);
|
||||||
|
+#endif
|
||||||
|
#else
|
||||||
|
devicelist = upnpDiscover(2000, NULL, NULL, 0);
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.11.0
|
||||||
|
|
@ -29,6 +29,7 @@ DEPENDENCIES="
|
|||||||
BUGS_TO=""
|
BUGS_TO=""
|
||||||
|
|
||||||
DEFAULT_SRC_PREPARE_PATCHES=(
|
DEFAULT_SRC_PREPARE_PATCHES=(
|
||||||
|
-p1 "${FILES}"/3b08b907235c09ab84e3bb23d1e05fe5a1d1c00e.patch
|
||||||
-p1 "${FILES}"/${PNV}-Fix-cmake-skew.patch
|
-p1 "${FILES}"/${PNV}-Fix-cmake-skew.patch
|
||||||
-p0 "${FILES}"/${PNV}-soundconverter.patch
|
-p0 "${FILES}"/${PNV}-soundconverter.patch
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user