1 # --- T2-COPYRIGHT-BEGIN ---
2 # t2/package/*/transmission/hotfix-miniupnpc.patch
3 # Copyright (C) 2025 The T2 SDE Project
4 # SPDX-License-Identifier: GPL-2.0 or patched project license
5 # --- T2-COPYRIGHT-END ---
7 From febfe49ca3ecab1a7142ecb34012c1f0b2bcdee8 Mon Sep 17 00:00:00 2001
8 From: =?UTF-8?q?C=C5=93ur?= <coeur@gmx.fr>
9 Date: Sat, 15 Jun 2024 07:24:06 +0800
10 Subject: [PATCH] bump miniupnpc to 2.2.8 (#6907)
12 * bump miniupnpc to 2.2.8
14 * Avoid build error "ln: include/miniupnpc/.: Operation not permitted"
16 Transmission.xcodeproj/project.pbxproj | 2 +-
17 libtransmission/port-forwarding-upnp.cc | 9 +++++++--
18 third-party/miniupnp | 2 +-
19 3 files changed, 9 insertions(+), 4 deletions(-)
21 diff --git a/libtransmission/port-forwarding-upnp.cc b/libtransmission/port-forwarding-upnp.cc
22 index 6d7bbc7f7c2..a4146e0df13 100644
23 --- a/libtransmission/port-forwarding-upnp.cc
24 +++ b/libtransmission/port-forwarding-upnp.cc
25 @@ -261,8 +261,13 @@ tr_port_forwarding_state tr_upnpPulse(
27 FreeUPNPUrls(&handle->urls);
28 auto lanaddr = std::array<char, TR_ADDRSTRLEN>{};
29 - if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1) ==
30 - UPNP_IGD_VALID_CONNECTED)
32 +#if (MINIUPNPC_API_VERSION >= 18)
33 + UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1, nullptr, 0)
35 + UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1)
37 + == UPNP_IGD_VALID_CONNECTED)
39 tr_logAddInfo(fmt::format(_("Found Internet Gateway Device '{url}'"), fmt::arg("url", handle->urls.controlURL)));
40 tr_logAddInfo(fmt::format(_("Local Address is '{address}'"), fmt::arg("address", lanaddr.data())));