summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-01-10 20:56:32 +0100
committerDavid Seifert <soap@gentoo.org>2016-01-10 21:37:26 +0100
commit245ec6adbd16742786282dd6a06814a24d1a7567 (patch)
treec6728373c21776582559c6d25cb5fb968d611d76 /games-strategy/s25rttr/files
parentsci-geosciences/gmt: fetch repaired bug #561202 (diff)
downloadgentoo-245ec6adbd16742786282dd6a06814a24d1a7567.tar.gz
gentoo-245ec6adbd16742786282dd6a06814a24d1a7567.tar.bz2
gentoo-245ec6adbd16742786282dd6a06814a24d1a7567.zip
Revbump, include patch for miniUPnPc API breakage
Package-Manager: portage-2.2.26
Diffstat (limited to 'games-strategy/s25rttr/files')
-rw-r--r--games-strategy/s25rttr/files/s25rttr-0.8.1-miniupnpc-api-14.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/games-strategy/s25rttr/files/s25rttr-0.8.1-miniupnpc-api-14.patch b/games-strategy/s25rttr/files/s25rttr-0.8.1-miniupnpc-api-14.patch
new file mode 100644
index 000000000000..d2ff0ee1fe39
--- /dev/null
+++ b/games-strategy/s25rttr/files/s25rttr-0.8.1-miniupnpc-api-14.patch
@@ -0,0 +1,36 @@
+From 3b08b907235c09ab84e3bb23d1e05fe5a1d1c00e Mon Sep 17 00:00:00 2001
+From: Manuel Zeise <mail@manuel-zeise.de>
+Date: Sun, 3 Jan 2016 16:54:05 +0100
+Subject: [PATCH] Switch for miniUPnPc API version 14 and above
+
+API version 14 of miniUPnPc has introduced a new TTL argument to
+upnpDiscover() with a recommended default value of 2. A new preprocessor
+statement evaluates the API version and selects the correct version of
+upnpDiscover() based on the API version.
+
+--- s25rttr-0.8.1/libutil/src/UPnP.cpp
++++ s25rttr-0.8.1/libutil/src/UPnP.cpp
+@@ -210,7 +210,11 @@
+ 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 @@
+ 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