From f4a94261435014c15da52b436d7e8856fbf758fe Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Mon, 3 Mar 2025 23:29:54 +0100 Subject: [PATCH] zerotier: add patch to support miniupnpc 2.2.8 Signed-off-by: Moritz Warning --- net/zerotier/Makefile | 2 +- ...0006-add-support-for-miniupnpc-2.2.8.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 net/zerotier/patches/0006-add-support-for-miniupnpc-2.2.8.patch diff --git a/net/zerotier/Makefile b/net/zerotier/Makefile index bce1255421..bc19eaa7c2 100644 --- a/net/zerotier/Makefile +++ b/net/zerotier/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zerotier PKG_VERSION:=1.14.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/zerotier/ZeroTierOne/tar.gz/$(PKG_VERSION)? diff --git a/net/zerotier/patches/0006-add-support-for-miniupnpc-2.2.8.patch b/net/zerotier/patches/0006-add-support-for-miniupnpc-2.2.8.patch new file mode 100644 index 0000000000..00acd8ca68 --- /dev/null +++ b/net/zerotier/patches/0006-add-support-for-miniupnpc-2.2.8.patch @@ -0,0 +1,25 @@ +From a8cb9d188fabe750821661b5e34e9be467846283 Mon Sep 17 00:00:00 2001 +From: Moritz Warning +Date: Mon, 3 Mar 2025 23:26:42 +0100 +Subject: [PATCH] add support for miniupnpc 2.2.8 + +Signed-off-by: Moritz Warning +--- + osdep/PortMapper.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/osdep/PortMapper.cpp ++++ b/osdep/PortMapper.cpp +@@ -230,7 +230,12 @@ public: + OSUtils::ztsnprintf(inport,sizeof(inport),"%d",localPort); + + int foundValidIGD = 0; ++#if MINIUPNPC_API_VERSION < 18 + if ((foundValidIGD = UPNP_GetValidIGD(devlist,&urls,&data,lanaddr,sizeof(lanaddr)))&&(lanaddr[0])) { ++#else ++ if ((foundValidIGD = UPNP_GetValidIGD(devlist,&urls,&data,lanaddr,sizeof(lanaddr),NULL,0))&&(lanaddr[0])) { ++#endif ++ + #ifdef ZT_PORTMAPPER_TRACE + PM_TRACE("PortMapper: UPnP: my LAN IP address: %s" ZT_EOL_S,lanaddr); + #endif -- 2.30.2