summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2024-06-23 16:45:38 +0100
committerJames Le Cuirot <chewi@gentoo.org>2024-06-23 16:46:17 +0100
commit09eb59d7880d5a499b3890def7989f532715fefe (patch)
tree2c1f61a2a3e0342e722e089a715ab35bd557a057 /net-misc/sunshine
parentnet-misc/sunshine: Fix up 9999 for latest changes (diff)
downloadgentoo-09eb59d7880d5a499b3890def7989f532715fefe.tar.gz
gentoo-09eb59d7880d5a499b3890def7989f532715fefe.tar.bz2
gentoo-09eb59d7880d5a499b3890def7989f532715fefe.zip
net-misc/sunshine: Fix 0.23.1 with newer miniupnpc using patch
Closes: https://bugs.gentoo.org/934173 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'net-misc/sunshine')
-rw-r--r--net-misc/sunshine/files/sunshine-miniupnpc.patch43
-rw-r--r--net-misc/sunshine/sunshine-0.23.1.ebuild1
2 files changed, 44 insertions, 0 deletions
diff --git a/net-misc/sunshine/files/sunshine-miniupnpc.patch b/net-misc/sunshine/files/sunshine-miniupnpc.patch
new file mode 100644
index 000000000000..3847724eedc5
--- /dev/null
+++ b/net-misc/sunshine/files/sunshine-miniupnpc.patch
@@ -0,0 +1,43 @@
+https://bugs.gentoo.org/934173
+https://github.com/LizardByte/Sunshine/pull/2746
+
+From 850f656676d30ffb47028e865982e56be161d179 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sun, 23 Jun 2024 16:21:23 +0100
+Subject: [PATCH] fix(upnp): Support miniupnpc API version 18 (release 2.2.8)
+
+---
+ src/upnp.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/upnp.cpp b/src/upnp.cpp
+index 2743ebae..e6ec057b 100644
+--- a/src/upnp.cpp
++++ b/src/upnp.cpp
+@@ -109,7 +109,11 @@ namespace upnp {
+ IGDdatas data;
+ urls_t urls;
+ std::array<char, INET6_ADDRESS_STRLEN> lan_addr;
++#if (MINIUPNPC_API_VERSION >= 18)
++ auto status = UPNP_GetValidIGD(device.get(), &urls.el, &data, lan_addr.data(), lan_addr.size(), nullptr, 0);
++#else
+ auto status = UPNP_GetValidIGD(device.get(), &urls.el, &data, lan_addr.data(), lan_addr.size());
++#endif
+ if (status != 1 && status != 2) {
+ BOOST_LOG(debug) << "No valid IPv6 IGD: "sv << status_string(status);
+ return false;
+@@ -331,7 +335,11 @@ namespace upnp {
+ std::array<char, INET6_ADDRESS_STRLEN> lan_addr;
+
+ urls_t urls;
++#if (MINIUPNPC_API_VERSION >= 18)
++ auto status = UPNP_GetValidIGD(device.get(), &urls.el, &data, lan_addr.data(), lan_addr.size(), nullptr, 0);
++#else
+ auto status = UPNP_GetValidIGD(device.get(), &urls.el, &data, lan_addr.data(), lan_addr.size());
++#endif
+ if (status != 1 && status != 2) {
+ BOOST_LOG(error) << status_string(status);
+ mapped = false;
+--
+2.45.2
+
diff --git a/net-misc/sunshine/sunshine-0.23.1.ebuild b/net-misc/sunshine/sunshine-0.23.1.ebuild
index f700216a63b6..d197b35c6616 100644
--- a/net-misc/sunshine/sunshine-0.23.1.ebuild
+++ b/net-misc/sunshine/sunshine-0.23.1.ebuild
@@ -179,6 +179,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-custom-ffmpeg.patch
"${FILESDIR}"/${PN}-0.22.0-nvcodec.patch
"${FILESDIR}"/${PN}-find-npm.patch
+ "${FILESDIR}"/${PN}-miniupnpc.patch
)
# Make this mess a bit simpler.