aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2024-07-19 16:05:38 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2024-07-19 16:05:38 +0000
commitd3319c96b939b0c7e0c7548a34d24a3c5030e274 (patch)
tree3f75326a5903aa9446df8d1144c1f51ec9852a99
parent8752173ea61388bdfe12b38b300ff14569603634 (diff)
downloadports-d3319c96b939b0c7e0c7548a34d24a3c5030e274.tar.gz
ports-d3319c96b939b0c7e0c7548a34d24a3c5030e274.zip
net-p2p/retroshare: fix build with miniupnpc 2.2.8
PR: 280298
-rw-r--r--games/openclonk/files/patch-src_network_C4Network2UPnPLinux.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/games/openclonk/files/patch-src_network_C4Network2UPnPLinux.cpp b/games/openclonk/files/patch-src_network_C4Network2UPnPLinux.cpp
new file mode 100644
index 000000000000..b15163ebf8c4
--- /dev/null
+++ b/games/openclonk/files/patch-src_network_C4Network2UPnPLinux.cpp
@@ -0,0 +1,14 @@
+--- src/network/C4Network2UPnPLinux.cpp.orig 2018-03-16 17:25:33 UTC
++++ src/network/C4Network2UPnPLinux.cpp
+@@ -77,7 +77,11 @@ void C4Network2UPnPP::Init()
+ if ((devlist = upnpDiscover(2000, nullptr, nullptr, UPNP_LOCAL_PORT_ANY, 0, 2, &error)))
+ #endif
+ {
++#if MINIUPNPC_API_VERSION >= 18
++ if ((status = UPNP_GetValidIGD(devlist, &upnp_urls, &igd_data, lanaddr, sizeof(lanaddr), NULL, 0)))
++#else
+ if ((status = UPNP_GetValidIGD(devlist, &upnp_urls, &igd_data, lanaddr, sizeof(lanaddr))))
++#endif
+ {
+ ThreadLogS("UPnP: Found IGD %s (status %d)", upnp_urls.controlURL, status);
+ initialized = true;