summaryrefslogtreecommitdiffstats
path: root/modules/upnp/upnp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/upnp/upnp.cpp')
-rw-r--r--modules/upnp/upnp.cpp4
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);