transmission_3: add patch for miniupnpc 2.2.8

I didn’t upstream this patch because this version is unmaintained.
This commit is contained in:
Emily 2024-07-11 12:58:05 +01:00
parent b0ee42d215
commit 579e16b061
2 changed files with 20 additions and 0 deletions

View File

@ -47,6 +47,8 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
# fix build with openssl 3.0
./transmission-3.00-openssl-3.patch
# fix build with miniupnpc 2.2.8
./transmission-3.00-miniupnpc-2.2.8.patch
];
outputs = [ "out" "apparmor" ];

View File

@ -0,0 +1,18 @@
diff --git a/libtransmission/upnp.c b/libtransmission/upnp.c
index c9e248a379...c7b2580bcb 100644
--- a/libtransmission/upnp.c
+++ b/libtransmission/upnp.c
@@ -194,8 +194,13 @@
errno = 0;
+#if (MINIUPNPC_API_VERSION >= 18)
if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, handle->lanaddr,
+ sizeof(handle->lanaddr), NULL, 0) == UPNP_IGD_VALID_CONNECTED)
+#else
+ if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, handle->lanaddr,
sizeof(handle->lanaddr)) == UPNP_IGD_VALID_CONNECTED)
+#endif
{
tr_logAddNamedInfo(getKey(), _("Found Internet Gateway Device \"%s\""), handle->urls.controlURL);
tr_logAddNamedInfo(getKey(), _("Local Address is \"%s\""), handle->lanaddr);