git: e71086573796 - main - dns/kadnode: fix build with miniupnpc 2.2.8

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

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

commit e71086573796589c56d292163011005ec354b94e
Author:     Dirk Meyer <dinoex@FreeBSD.org>
AuthorDate: 2024-07-19 14:35:47 +0000
Commit:     Dirk Meyer <dinoex@FreeBSD.org>
CommitDate: 2024-07-19 14:35:47 +0000

    dns/kadnode: fix build with miniupnpc 2.2.8
    
    PR: 280298
---
 dns/kadnode/files/patch-src_upnp.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/dns/kadnode/files/patch-src_upnp.c b/dns/kadnode/files/patch-src_upnp.c
new file mode 100644
index 000000000000..f23f8487aa04
--- /dev/null
+++ b/dns/kadnode/files/patch-src_upnp.c
@@ -0,0 +1,16 @@
+--- src/upnp.c.orig	2020-02-09 21:48:57 UTC
++++ src/upnp.c
+@@ -134,8 +134,13 @@ int upnp_handler(struct upnp_handle_t *handle, uint16_
+ 			handle->retry = now + (10 * 60);
+ 			handle->state = UPNP_STATE_DISCOVER_GATEWAY;
+ 			return PF_RETRY;
++#if (MINIUPNPC_API_VERSION >= 18)
+ 		} else if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data,
++				handle->addr, sizeof(handle->addr), NULL, 0) == 1) {
++#else
++		} else if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data,
+ 				handle->addr, sizeof(handle->addr)) == 1) {
++#endif                  
+ 			freeUPNPDevlist(devlist);
+ 			log_info("UPnP: Found gateway device \"%s\".", handle->urls.controlURL);
+ 			handle->state = UPNP_STATE_GET_PORTMAPPING;