summaryrefslogtreecommitdiff
blob: 7cca21840c7f486ea6b44f933e0fbcc52a9ea2ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 33bf1489e75d1b1cc834d6eb9629598cd77d6c58 Mon Sep 17 00:00:00 2001
From: Pavel Vatagin <pavelvat@gmail.com>
Date: Sun, 17 Jan 2016 03:00:36 +0300
Subject: [PATCH] extra: fix static build for windows with -DLOCAL_MINIUPNP=OFF

---
 extra/upnpc.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/extra/upnpc.cpp b/extra/upnpc.cpp
index 63f6d34..40a011a 100644
--- a/extra/upnpc.cpp
+++ b/extra/upnpc.cpp
@@ -42,7 +42,7 @@ using namespace dcpp;
 bool UPnPc::init()
 {
     UPNPDev *devices = upnpDiscover(5000, SettingsManager::getInstance()->isDefault(SettingsManager::BIND_ADDRESS) ? 0 : SETTING(BIND_ADDRESS).c_str(), 0, 0
-#if (MINIUPNPC_API_VERSION == 8 || defined(MINIUPNPC16))
+#if (MINIUPNPC_API_VERSION >= 8 || defined(MINIUPNPC16))
                                         , 0, 0);
 #else
                                         );
@@ -64,7 +64,7 @@ bool UPnPc::add(const unsigned short port, const UPnP::Protocol protocol, const
 
     return UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port_.c_str(), port_.c_str(),
         Util::getLocalIp(AF_INET).c_str(), description.c_str(), protocols[protocol], NULL
-#if (MINIUPNPC_API_VERSION == 8 || defined(MINIUPNPC16))
+#if (MINIUPNPC_API_VERSION >= 8 || defined(MINIUPNPC16))
                                                                                     , 0) == UPNPCOMMAND_SUCCESS;
 #else
                                                                                     ) == UPNPCOMMAND_SUCCESS;