From 588cc4c90411834053879c1fd533f9c0aa31789c Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 22 Apr 2026 12:12:19 +0300 Subject: [PATCH] miniupnpc: update to 2.3.3 Changes since 2.2.8: - Fix crash related to FD_SET and socket timeout handling - Fix build_absolute_url when if_indextoname() returns NULL - Add support for C23 and glibc 2.43 string function signatures - Improve poll() usage and C++ compiler compatibility Signed-off-by: Alexandru Ardelean --- net/miniupnpc/Makefile | 4 +-- .../patches/200-miniupnpc_desc.patch | 27 ++++++++++++------- net/miniupnpc/test.sh | 16 +++++++++++ 3 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 net/miniupnpc/test.sh diff --git a/net/miniupnpc/Makefile b/net/miniupnpc/Makefile index 0f2f38f4d7..ae283384db 100644 --- a/net/miniupnpc/Makefile +++ b/net/miniupnpc/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=miniupnpc -PKG_VERSION:=2.2.8 +PKG_VERSION:=2.3.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files -PKG_HASH:=05b929679091b9921b6b6c1f25e39e4c8d1f4d46c8feb55a412aa697aee03a93 +PKG_HASH:=d52a0afa614ad6c088cc9ddff1ae7d29c8c595ac5fdd321170a05f41e634bd1a PKG_MAINTAINER:=Alexandru Ardelean PKG_LICENSE:=BSD-3-Clause diff --git a/net/miniupnpc/patches/200-miniupnpc_desc.patch b/net/miniupnpc/patches/200-miniupnpc_desc.patch index 681fc5ed39..7087928aba 100644 --- a/net/miniupnpc/patches/200-miniupnpc_desc.patch +++ b/net/miniupnpc/patches/200-miniupnpc_desc.patch @@ -1,11 +1,20 @@ --- a/src/upnpcommands.c +++ b/src/upnpcommands.c -@@ -371,7 +371,7 @@ UPNP_AddPortMapping(const char * control - AddPortMappingArgs[5].elt = "NewEnabled"; - AddPortMappingArgs[5].val = "1"; - AddPortMappingArgs[6].elt = "NewPortMappingDescription"; -- AddPortMappingArgs[6].val = desc?desc:"libminiupnpc"; -+ AddPortMappingArgs[6].val = desc?desc:"miniupnpc"; - AddPortMappingArgs[7].elt = "NewLeaseDuration"; - AddPortMappingArgs[7].val = leaseDuration?leaseDuration:"0"; - buffer = simpleUPnPcommand(-1, controlURL, servicetype, +@@ -357,7 +357,7 @@ UPNP_AddPortMapping(const char * control + {"NewInternalPort", inPort}, + {"NewInternalClient", inClient}, + {"NewEnabled", "1"}, +- {"NewPortMappingDescription", desc?desc:"libminiupnpc"}, ++ {"NewPortMappingDescription", desc?desc:"miniupnpc"}, + {"NewLeaseDuration", leaseDuration?leaseDuration:"0"}, + {NULL, NULL} + }; +@@ -411,7 +411,7 @@ UPNP_AddAnyPortMapping(const char * cont + {"NewInternalPort", inPort}, + {"NewInternalClient", inClient}, + {"NewEnabled", "1"}, +- {"NewPortMappingDescription", desc?desc:"libminiupnpc"}, ++ {"NewPortMappingDescription", desc?desc:"miniupnpc"}, + {"NewLeaseDuration", leaseDuration?leaseDuration:"0"}, + {NULL, NULL} + }; diff --git a/net/miniupnpc/test.sh b/net/miniupnpc/test.sh new file mode 100644 index 0000000000..78c50481fe --- /dev/null +++ b/net/miniupnpc/test.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +case "$1" in +libminiupnpc) + # Verify the shared library is installed + ls /usr/lib/libminiupnpc.so.* > /dev/null + ;; +miniupnpc) + # upnpc without args exits non-zero but prints usage including port + # redirection operations and the discover (-l) option + upnpc 2>&1 | grep -qi "Add port redirection\|port redirection\|upnp" + ;; +*) + exit 0 + ;; +esac