diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-18 11:50:54 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-18 11:50:54 +0200 |
commit | 4c72d599f0a171a96e47004239f42756115b723f (patch) | |
tree | cd37a85950963914080f3158120b8864cf4ffa73 /modules | |
parent | 84dcdde9088d512efebb0033fb881d8f7fd9c107 (diff) | |
download | redot-engine-4c72d599f0a171a96e47004239f42756115b723f.tar.gz |
miniupnpc: Update to 2.2.8 (new major 18)
Keep support for major 17 by using a version check for the changed API.
Fixes #93907.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/upnp/upnp.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/upnp/upnp.cpp b/modules/upnp/upnp.cpp index 6bdb261b50..4305bf842a 100644 --- a/modules/upnp/upnp.cpp +++ b/modules/upnp/upnp.cpp @@ -131,7 +131,11 @@ void UPNP::parse_igd(Ref<UPNPDevice> dev, UPNPDev *devlist) { GetUPNPUrls(&urls, &data, dev->get_description_url().utf8().get_data(), 0); char addr[16]; +#if MINIUPNPC_API_VERSION >= 18 + int i = UPNP_GetValidIGD(devlist, &urls, &data, (char *)&addr, 16, nullptr, 0); +#else int i = UPNP_GetValidIGD(devlist, &urls, &data, (char *)&addr, 16); +#endif if (i != 1) { FreeUPNPUrls(&urls); |