summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Network/MiniUPnPInterface.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swiften/Network/MiniUPnPInterface.cpp b/Swiften/Network/MiniUPnPInterface.cpp
index b2afd88..94305b9 100644
--- a/Swiften/Network/MiniUPnPInterface.cpp
+++ b/Swiften/Network/MiniUPnPInterface.cpp
@@ -35,7 +35,11 @@ struct MiniUPnPInterface::Private {
MiniUPnPInterface::MiniUPnPInterface() : p(std::make_shared<Private>()) {
p->isValid = false;
int error = 0;
+#if MINIUPNPC_API_VERSION > 14
+ p->deviceList = upnpDiscover(1500 /* timeout in ms */, nullptr, nullptr, 0, 0 /* do IPv6? */, 2 /* default TTL */, &error);
+#else
p->deviceList = upnpDiscover(1500 /* timeout in ms */, nullptr, nullptr, 0, 0 /* do IPv6? */, &error);
+#endif
if (!p->deviceList) {
return;
}