From e302734ffad7e029e1884a52df3e5e8b1feb7d92 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Tue, 14 Nov 2017 08:20:19 +0300 Subject: [PATCH] travis-ci cmake fix [3] --- daemon/UPnP.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/UPnP.cpp b/daemon/UPnP.cpp index 402585c1..ba7b408c 100644 --- a/daemon/UPnP.cpp +++ b/daemon/UPnP.cpp @@ -79,10 +79,10 @@ namespace transport void UPnP::Discover () { -#if (MINIUPNPC_API_VERSION >= 14) +#if MINIUPNPC_API_VERSION >= 14 int nerror = 0; m_Devlist = upnpDiscover (2000, m_MulticastIf, m_Minissdpdpath, 0, 0, 2, &nerror); -#elif (MINIUPNPC_API_VERSION >= 8) +#elif ( MINIUPNPC_API_VERSION >= 8 || defined(UPNPDISCOVER_SUCCESS) ) int nerror = 0; m_Devlist = upnpDiscover (2000, m_MulticastIf, m_Minissdpdpath, 0, 0, &nerror); #else @@ -158,7 +158,7 @@ namespace transport std::string strType (GetProto (address)), strPort (std::to_string (address->port)); int r; std::string strDesc; i2p::config::GetOption("upnp.name", strDesc); -#if (MINIUPNPC_API_VERSION >= 8) +#ifdef UPNPDISCOVER_SUCCESS r = UPNP_AddPortMapping (m_upnpUrls.controlURL, m_upnpData.first.servicetype, strPort.c_str (), strPort.c_str (), m_NetworkAddr, strDesc.c_str (), strType.c_str (), 0, "0"); #else r = UPNP_AddPortMapping (m_upnpUrls.controlURL, m_upnpData.first.servicetype, strPort.c_str (), strPort.c_str (), m_NetworkAddr, strDesc.c_str (), strType.c_str (), 0);