From cb1cd6d23c56ff06009803702be87a2a2a229331 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Thu, 22 Oct 2015 21:17:56 +0000 Subject: net-p2p/bitcoin{-qt,d}: Backport miniupnpc-14 support to older versions --- net-p2p/bitcoind/files/miniupnpc-14.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 net-p2p/bitcoind/files/miniupnpc-14.patch (limited to 'net-p2p/bitcoind/files') diff --git a/net-p2p/bitcoind/files/miniupnpc-14.patch b/net-p2p/bitcoind/files/miniupnpc-14.patch new file mode 100644 index 000000000000..aa8e32ff7c1a --- /dev/null +++ b/net-p2p/bitcoind/files/miniupnpc-14.patch @@ -0,0 +1,28 @@ +commit 9f3e48e5219a09b5ddfd6883d1f0498910eff4b6 (origin-pull/6583/head) +Author: Pavel Vasin +Date: Sun Aug 23 23:53:49 2015 +0300 + + add support for miniupnpc api version 14 + + The value of new arg ttl is set to 2 as it's recommended default. + +diff --git a/src/net.cpp b/src/net.cpp +index fb5726a..4c6331f 100644 +--- a/src/net.cpp ++++ b/src/net.cpp +@@ -1120,10 +1120,14 @@ void ThreadMapPort() + #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; -- cgit v1.2.3-65-gdbad