bump miniupnpc to 2.2.8 (#6907)

* bump miniupnpc to 2.2.8

* Avoid build error "ln: include/miniupnpc/.: Operation not permitted"
This commit is contained in:
Cœur
2024-06-15 07:24:06 +08:00
committed by GitHub
parent ec6112e0b1
commit febfe49ca3
3 changed files with 9 additions and 4 deletions

View File

@@ -3102,7 +3102,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cd third-party/miniupnp/miniupnpc\nln -sf . include/miniupnpc\n";
shellScript = "cd third-party/miniupnp/miniupnpc\nln -snf . include/miniupnpc\n";
};
C12F197E1E1AE6D50005E93F /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;

View File

@@ -261,8 +261,13 @@ tr_port_forwarding_state tr_upnpPulse(
FreeUPNPUrls(&handle->urls);
auto lanaddr = std::array<char, TR_ADDRSTRLEN>{};
if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1) ==
UPNP_IGD_VALID_CONNECTED)
if (
#if (MINIUPNPC_API_VERSION >= 18)
UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1, nullptr, 0)
#else
UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, std::data(lanaddr), std::size(lanaddr) - 1)
#endif
== UPNP_IGD_VALID_CONNECTED)
{
tr_logAddInfo(fmt::format(_("Found Internet Gateway Device '{url}'"), fmt::arg("url", handle->urls.controlURL)));
tr_logAddInfo(fmt::format(_("Local Address is '{address}'"), fmt::arg("address", lanaddr.data())));