git: 8752173ea613 - main - net-p2p/retroshare: fix build with miniupnpc 2.2.8

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=8752173ea61388bdfe12b38b300ff14569603634

commit 8752173ea61388bdfe12b38b300ff14569603634
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2024-07-19 15:58:06 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2024-07-19 15:58:06 +0000

    net-p2p/retroshare: fix build with miniupnpc 2.2.8
    
    PR: 280298
---
 ...atch-libretroshare_src_upnp_upnphandler_miniupnp.cc | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/net-p2p/retroshare/files/patch-libretroshare_src_upnp_upnphandler_miniupnp.cc b/net-p2p/retroshare/files/patch-libretroshare_src_upnp_upnphandler_miniupnp.cc
new file mode 100644
index 000000000000..ea4cc7beeea9
--- /dev/null
+++ b/net-p2p/retroshare/files/patch-libretroshare_src_upnp_upnphandler_miniupnp.cc
@@ -0,0 +1,18 @@
+--- libretroshare/src/upnp/upnphandler_miniupnp.cc.orig	2018-03-13 19:25:38 UTC
++++ libretroshare/src/upnp/upnphandler_miniupnp.cc
+@@ -116,9 +116,15 @@ bool upnphandler::initUPnPState()
+ 				   device->descURL, device->st);
+ 		}
+ 		putchar('\n');
++#if MINIUPNPC_API_VERSION >= 18
+ 		if(UPNP_GetValidIGD(upcd->devlist, &(upcd->urls),
+ 				&(upcd->data), upcd->lanaddr,
++				sizeof(upcd->lanaddr), NULL, 0))
++#else
++		if(UPNP_GetValidIGD(upcd->devlist, &(upcd->urls),
++				&(upcd->data), upcd->lanaddr,
+ 				sizeof(upcd->lanaddr)))
++#endif//>=18
+ 		{
+ 			printf("Found valid IGD : %s\n",
+ 					upcd->urls.controlURL);