git: 49c08288dee3 - main - net-p2p/monero-cli: fix build with miniupnpc 2.2.8

From: Dirk Meyer <dinoex_at_FreeBSD.org>
Date: Fri, 19 Jul 2024 15:08:26 UTC
The branch main has been updated by dinoex:

URL: https://cgit.FreeBSD.org/ports/commit/?id=49c08288dee302df00202b879cfd77b09c83b781

commit 49c08288dee302df00202b879cfd77b09c83b781
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2024-07-19 15:08:14 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2024-07-19 15:08:14 +0000

    net-p2p/monero-cli: fix build with miniupnpc 2.2.8
    
    PR: 280298
---
 .../monero-cli/files/patch-src_p2p_net__node.inl   | 32 +++++++++++++++++++---
 1 file changed, 28 insertions(+), 4 deletions(-)

diff --git a/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl b/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl
index 5b41c099fdb3..b58bd7d07158 100644
--- a/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl
+++ b/net-p2p/monero-cli/files/patch-src_p2p_net__node.inl
@@ -1,8 +1,8 @@
---- src/p2p/net_node.inl.orig	2018-06-06 19:28:51.925128000 UTC
-+++ src/p2p/net_node.inl	2018-06-06 19:29:06.877331000 UTC
-@@ -49,9 +49,9 @@
- #include "storages/levin_abstract_invoke2.h"
+--- src/p2p/net_node.inl.orig	2023-10-02 19:28:11 UTC
++++ src/p2p/net_node.inl
+@@ -60,9 +60,9 @@
  #include "cryptonote_core/cryptonote_core.h"
+ #include "net/parse.h"
  
 -#include <miniupnp/miniupnpc/miniupnpc.h>
 -#include <miniupnp/miniupnpc/upnpcommands.h>
@@ -13,3 +13,27 @@
  
  #undef MONERO_DEFAULT_LOG_CATEGORY
  #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
+@@ -2989,7 +2989,11 @@ namespace nodetool
+     UPNPUrls urls;
+     IGDdatas igdData;
+     char lanAddress[64];
++#if MINIUPNPC_API_VERSION >= 18
++    result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, NULL, 0);
++#else
+     result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
++#endif 
+     freeUPNPDevlist(deviceList);
+     if (result > 0) {
+       if (result == 1) {
+@@ -3057,7 +3061,11 @@ namespace nodetool
+     UPNPUrls urls;
+     IGDdatas igdData;
+     char lanAddress[64];
++#if MINIUPNPC_API_VERSION >= 18
++    result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, NULL, 0);
++#else
+     result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress);
++#endif 
+     freeUPNPDevlist(deviceList);
+     if (result > 0) {
+       if (result == 1) {