diff --git a/core/network/miniupnp.cpp b/core/network/miniupnp.cpp index c5ecf120d..8f7be3301 100644 --- a/core/network/miniupnp.cpp +++ b/core/network/miniupnp.cpp @@ -43,7 +43,11 @@ bool MiniUPnP::Init() WARN_LOG(NETWORK, "UPnP discover failed: error %d", error); return false; } +#if MINIUPNPC_API_VERSION >= 18 + error = UPNP_GetValidIGD(devlist, &urls, &data, lanAddress, sizeof(lanAddress), nullptr, 0); +#else error = UPNP_GetValidIGD(devlist, &urls, &data, lanAddress, sizeof(lanAddress)); +#endif freeUPNPDevlist(devlist); if (error != 1) {