From 96c6df66af165100476516c007b5733e48dce22f Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Thu, 29 Dec 2016 20:17:19 +0100 Subject: [PATCH] games-strategy/s25rttr: fix building against latest miniupnpc --- ...b907235c09ab84e3bb23d1e05fe5a1d1c00e.patch | 40 +++++++++++++++++++ .../s25rttr/s25rttr-0.8.1.exheres-0 | 1 + 2 files changed, 41 insertions(+) create mode 100644 packages/games-strategy/s25rttr/files/3b08b907235c09ab84e3bb23d1e05fe5a1d1c00e.patch diff --git a/packages/games-strategy/s25rttr/files/3b08b907235c09ab84e3bb23d1e05fe5a1d1c00e.patch b/packages/games-strategy/s25rttr/files/3b08b907235c09ab84e3bb23d1e05fe5a1d1c00e.patch new file mode 100644 index 00000000..956e937f --- /dev/null +++ b/packages/games-strategy/s25rttr/files/3b08b907235c09ab84e3bb23d1e05fe5a1d1c00e.patch @@ -0,0 +1,40 @@ +From baefdbc828a0b057f165c4a6f2ecb5b1641b9f70 Mon Sep 17 00:00:00 2001 +From: Julian Ospald +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 + diff --git a/packages/games-strategy/s25rttr/s25rttr-0.8.1.exheres-0 b/packages/games-strategy/s25rttr/s25rttr-0.8.1.exheres-0 index 52c7fa33..c33341de 100644 --- a/packages/games-strategy/s25rttr/s25rttr-0.8.1.exheres-0 +++ b/packages/games-strategy/s25rttr/s25rttr-0.8.1.exheres-0 @@ -29,6 +29,7 @@ DEPENDENCIES=" BUGS_TO="" DEFAULT_SRC_PREPARE_PATCHES=( + -p1 "${FILES}"/3b08b907235c09ab84e3bb23d1e05fe5a1d1c00e.patch -p1 "${FILES}"/${PNV}-Fix-cmake-skew.patch -p0 "${FILES}"/${PNV}-soundconverter.patch )