summaryrefslogtreecommitdiff
path: root/net-p2p/monero/files/monero-0.18.3.3-upnp-add-support-for-miniupnpc-API-version-18.patch
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2024-07-17 22:55:40 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2024-07-17 22:58:59 +0100
commitd5ebc8cb4b8889cb13837626da7537bcc4126229 (patch)
treeae290c8db1ac7f3f9961c71cdf0a565eacf2ab7f /net-p2p/monero/files/monero-0.18.3.3-upnp-add-support-for-miniupnpc-API-version-18.patch
parentnet-p2p/monero: remove unused patches (diff)
downloadportage-d5ebc8cb4b8889cb13837626da7537bcc4126229.tar.xz
net-p2p/monero: update patches for boost 1.8.5 and miniupnpc 2.2.8
Diffstat (limited to 'net-p2p/monero/files/monero-0.18.3.3-upnp-add-support-for-miniupnpc-API-version-18.patch')
-rw-r--r--net-p2p/monero/files/monero-0.18.3.3-upnp-add-support-for-miniupnpc-API-version-18.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/net-p2p/monero/files/monero-0.18.3.3-upnp-add-support-for-miniupnpc-API-version-18.patch b/net-p2p/monero/files/monero-0.18.3.3-upnp-add-support-for-miniupnpc-API-version-18.patch
new file mode 100644
index 00000000..9bd84b74
--- /dev/null
+++ b/net-p2p/monero/files/monero-0.18.3.3-upnp-add-support-for-miniupnpc-API-version-18.patch
@@ -0,0 +1,44 @@
+From 7a6f6a175183880f0045b301af5c6ada2d416734 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Wed, 17 Jul 2024 20:05:38 +0100
+Subject: [PATCH] upnp: add support for miniupnpc API version 18
+
+miniupnpc 2.2.8 updated API to version 18, with breaking change to
+UPNP_GetValidIGD().
+
+See: https://github.com/miniupnp/miniupnp/commit/c0a50ce33e3b99ce8a96fd43049bb5b53ffac62f
+See: http://miniupnp.free.fr/files/changelog.php?file=miniupnpc-2.2.8.tar.gz
+---
+ src/p2p/net_node.inl | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
+index 0528e0bc7988..64772f2b1144 100644
+--- a/src/p2p/net_node.inl
++++ b/src/p2p/net_node.inl
+@@ -2989,7 +2989,12 @@ namespace nodetool
+ UPNPUrls urls;
+ IGDdatas igdData;
+ char lanAddress[64];
++#if MINIUPNPC_API_VERSION < 18
+ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
++#else
++ char wanAddress[64];
++ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof wanAddress);
++#endif
+ freeUPNPDevlist(deviceList);
+ if (result > 0) {
+ if (result == 1) {
+@@ -3057,7 +3062,12 @@ namespace nodetool
+ UPNPUrls urls;
+ IGDdatas igdData;
+ char lanAddress[64];
++#if MINIUPNPC_API_VERSION < 18
+ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
++#else
++ char wanAddress[64];
++ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof wanAddress);
++#endif
+ freeUPNPDevlist(deviceList);
+ if (result > 0) {
+ if (result == 1) {