diff --git a/Transmission.xcodeproj/project.pbxproj b/Transmission.xcodeproj/project.pbxproj index dd978e0dc..576edd10c 100644 --- a/Transmission.xcodeproj/project.pbxproj +++ b/Transmission.xcodeproj/project.pbxproj @@ -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; diff --git a/libtransmission/port-forwarding-upnp.cc b/libtransmission/port-forwarding-upnp.cc index 6d7bbc7f7..a4146e0df 100644 --- a/libtransmission/port-forwarding-upnp.cc +++ b/libtransmission/port-forwarding-upnp.cc @@ -261,8 +261,13 @@ tr_port_forwarding_state tr_upnpPulse( FreeUPNPUrls(&handle->urls); auto lanaddr = std::array{}; - 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()))); diff --git a/third-party/miniupnp b/third-party/miniupnp index 7f189988a..b55145ec0 160000 --- a/third-party/miniupnp +++ b/third-party/miniupnp @@ -1 +1 @@ -Subproject commit 7f189988a0decca0ab7da89000051ab91751f70d +Subproject commit b55145ec095652289a59c33603f3abafee898273