Skip to content

Commit

Permalink
add support for miniupnpc 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fflo committed Jun 3, 2017
1 parent 853a040 commit 53b5955
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions 611-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ QMAKE_EXTRA_COMPILERS += TSQM

# platform specific defaults, if not overridden on command line
isEmpty(BOOST_LIB_SUFFIX) {
# macx:BOOST_LIB_SUFFIX = -mt
macx:BOOST_LIB_SUFFIX = -mt
win32:BOOST_LIB_SUFFIX = -mgw49-mt-s-1_59
}

Expand All @@ -350,8 +350,8 @@ isEmpty(BDB_INCLUDE_PATH) {
}

# compile workaround mac os x
macx:BOOST_LIB_PATH = /opt/boost-159/lib
macx:BOOST_INCLUDE_PATH = /opt/boost-159/include
#macx:BOOST_LIB_PATH = /opt/boost-159/lib
#macx:BOOST_INCLUDE_PATH = /opt/boost-159/include

isEmpty(BOOST_LIB_PATH) {
macx:BOOST_LIB_PATH = /opt/local/lib
Expand Down
6 changes: 5 additions & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1117,10 +1117,14 @@ void ThreadMapPort2(void* parg)
#ifndef UPNPDISCOVER_SUCCESS
/* miniupnpc 1.5 */
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
#else
#elif MINIUPNPC_API_VERSION < 14
/* miniupnpc 1.6 */
int error = 0;
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
#else
/* miniupnpc 1.9.20150730 */
int error = 0;
devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
#endif

struct UPNPUrls urls;
Expand Down

0 comments on commit 53b5955

Please sign in to comment.