depot/pkgs/by-name/tr/transmission_3/transmission-3.00-miniupnpc-2.2.8.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

18 lines
778 B
Diff

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);