diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-06-17 00:09:46 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-06-17 00:09:46 +0100 |
commit | 74e526c590f52d24a213e25f77858ae0b34ec2c8 (patch) | |
tree | 0f6f22133ae9cc04958f6df6d39a02d90ffb1aaf /games-strategy/s25rttr/files | |
parent | 0a3feeaba4dbc58966dccdbbfcd7fb14deef0831 (diff) |
gentoo auto-resync : 17:06:2024 - 00:09:46
Diffstat (limited to 'games-strategy/s25rttr/files')
-rw-r--r-- | games-strategy/s25rttr/files/s25rttr-0.9.5-miniupnpc.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/games-strategy/s25rttr/files/s25rttr-0.9.5-miniupnpc.patch b/games-strategy/s25rttr/files/s25rttr-0.9.5-miniupnpc.patch new file mode 100644 index 000000000000..e09c258e2b41 --- /dev/null +++ b/games-strategy/s25rttr/files/s25rttr-0.9.5-miniupnpc.patch @@ -0,0 +1,34 @@ +From c7b6e56337cbb03d9ed3aa601cb6e79e7858249a Mon Sep 17 00:00:00 2001 +From: James Le Cuirot <chewi@gentoo.org> +Date: Sun, 16 Jun 2024 21:22:08 +0100 +Subject: [PATCH] Support miniupnpc API version 18 (release 2.2.8) and adjust + status check + +getValidIGD was treating non-zero return codes as successful, but only 1 +should really be considered successful in this context. + +This maintains compatibility with earlier versions. +--- + libs/network/src/UPnP_Other.cpp | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/external/libutil/libs/network/src/UPnP_Other.cpp b/libs/network/src/UPnP_Other.cpp +index d684b9c..8fc9418 100644 +--- a/external/libutil/libs/network/src/UPnP_Other.cpp ++++ b/external/libutil/libs/network/src/UPnP_Other.cpp +@@ -91,7 +91,11 @@ inline DeviceList discover(int delay, const char* multicastIf = nullptr, const c + inline bool getValidIGD(const DeviceList& deviceList, Urls& urls, IGDdatas& data, std::string& lanAddr) + { + lanAddr.resize(15); // Format: aaa.bbb.ccc.ddd +- return UPNP_GetValidIGD(deviceList, &urls, &data, &lanAddr[0], lanAddr.size()) != 0; ++#if (MINIUPNPC_API_VERSION >= 18) ++ return UPNP_GetValidIGD(deviceList, &urls, &data, &lanAddr[0], lanAddr.size(), NULL, 0) == 1; ++#else ++ return UPNP_GetValidIGD(deviceList, &urls, &data, &lanAddr[0], lanAddr.size()) == 1; ++#endif + } + + inline void addPortMapping(const char* controlURL, const char* servicetype, const std::string& extPort, +-- +2.45.1 + |