You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
bitcoin: add a patch for miniupnpc compatibility
This commit is contained in:
committed by
Renee Otten
parent
18eb19f0b6
commit
ef2e879ce3
@@ -13,7 +13,7 @@ legacysupport.use_mp_libcxx \
|
||||
name bitcoin
|
||||
categories finance crypto
|
||||
version 27.1
|
||||
revision 0
|
||||
revision 1
|
||||
license MIT
|
||||
maintainers {easieste @easye} yopmail.com:sami.laine openmaintainer
|
||||
description server daemon and client user interface for a peer-to-peer digital currency
|
||||
@@ -63,6 +63,9 @@ configure.args --disable-ccache \
|
||||
|
||||
compiler.cxx_standard 2020
|
||||
|
||||
# https://github.com/bitcoin/bitcoin/pull/30283
|
||||
patchfiles-append patch-miniupnpc-18.diff
|
||||
|
||||
# pool.h:161:27: error: aligned allocation function
|
||||
# of type 'void *(std::size_t, std::align_val_t)'
|
||||
# is only available on macOS 10.13 or newer
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 8acdf66540834b9f9cf28f16d389e8b6a48516d5 Mon Sep 17 00:00:00 2001
|
||||
From: Cory Fields <cory-nospam-@coryfields.com>
|
||||
Date: Thu, 13 Jun 2024 13:25:37 +0000
|
||||
Subject: [PATCH] upnp: add compatibility for miniupnpc 2.2.8
|
||||
|
||||
See: https://github.com/miniupnp/miniupnp/commit/c0a50ce33e3b99ce8a96fd43049bb5b53ffac62f
|
||||
|
||||
The return value of 2 now indicates:
|
||||
"A valid connected IGD has been found but its IP address is reserved (non routable)"
|
||||
|
||||
We continue to ignore any return value other than 1.
|
||||
---
|
||||
src/mapport.cpp | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/mapport.cpp b/src/mapport.cpp
|
||||
index 80670230c73a8..1920297be6d35 100644
|
||||
--- src/mapport.cpp
|
||||
+++ src/mapport.cpp
|
||||
@@ -161,8 +161,11 @@ static bool ProcessUpnp()
|
||||
struct UPNPUrls urls;
|
||||
struct IGDdatas data;
|
||||
int r;
|
||||
-
|
||||
+#if MINIUPNPC_API_VERSION <= 17
|
||||
r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr));
|
||||
+#else
|
||||
+ r = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr), nullptr, 0);
|
||||
+#endif
|
||||
if (r == 1)
|
||||
{
|
||||
if (fDiscover) {
|
||||
Reference in New Issue
Block a user