aboutsummaryrefslogtreecommitdiff
path: root/depends/patches
diff options
context:
space:
mode:
Diffstat (limited to 'depends/patches')
-rw-r--r--depends/patches/miniupnpc/cmake_get_src_addr.patch22
-rw-r--r--depends/patches/miniupnpc/dont_leak_info.patch26
-rw-r--r--depends/patches/miniupnpc/fix_windows_snprintf.patch25
-rw-r--r--depends/patches/miniupnpc/no_libtool.patch15
-rw-r--r--depends/patches/miniupnpc/respect_mingw_cflags.patch23
5 files changed, 60 insertions, 51 deletions
diff --git a/depends/patches/miniupnpc/cmake_get_src_addr.patch b/depends/patches/miniupnpc/cmake_get_src_addr.patch
new file mode 100644
index 0000000000..bae1b738f3
--- /dev/null
+++ b/depends/patches/miniupnpc/cmake_get_src_addr.patch
@@ -0,0 +1,22 @@
+commit cb2026239c2a3aff393952ccb0ee1c448189402d
+Author: fanquake <fanquake@gmail.com>
+Date: Fri Mar 22 14:03:54 2024 +0000
+
+ build: add MINIUPNPC_GET_SRC_ADDR to CMake build
+
+ This mirrors the autotools build.
+
+ See https://github.com/miniupnp/miniupnp/pull/721.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1aa95a8..0cacf3e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,6 +31,7 @@ endif ()
+ if (NOT WIN32)
+ target_compile_definitions(miniupnpc-private INTERFACE
+ MINIUPNPC_SET_SOCKET_TIMEOUT
++ MINIUPNPC_GET_SRC_ADDR
+ _BSD_SOURCE _DEFAULT_SOURCE)
+ if (NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES ".*BSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+ # add_definitions (-D_POSIX_C_SOURCE=200112L)
diff --git a/depends/patches/miniupnpc/dont_leak_info.patch b/depends/patches/miniupnpc/dont_leak_info.patch
index 512f9c50ea..95a09a26dc 100644
--- a/depends/patches/miniupnpc/dont_leak_info.patch
+++ b/depends/patches/miniupnpc/dont_leak_info.patch
@@ -1,31 +1,31 @@
-commit 8815452257437ba36607d0e2381c01142d1c7bb0
+commit 51f6dd991c29af66fb4f64c6feb2787cce23a1a7
Author: fanquake <fanquake@gmail.com>
-Date: Thu Nov 19 10:51:19 2020 +0800
+Date: Mon Jan 8 11:21:40 2024 +0000
Don't leak OS and miniupnpc version info in User-Agent
-diff --git a//minisoap.c b/minisoap.c
-index 7860667..775580b 100644
---- a/minisoap.c
-+++ b/minisoap.c
+diff --git a/src/minisoap.c b/src/minisoap.c
+index 903ac5f..046e0ea 100644
+--- a/src/minisoap.c
++++ b/src/minisoap.c
@@ -90,7 +90,7 @@ int soapPostSubmit(SOCKET fd,
headerssize = snprintf(headerbuf, sizeof(headerbuf),
"POST %s HTTP/%s\r\n"
"Host: %s%s\r\n"
-- "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
+- "User-Agent: " OS_STRING " " UPNP_VERSION_STRING " MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
+ "User-Agent: " UPNP_VERSION_STRING "\r\n"
"Content-Length: %d\r\n"
+ #if (UPNP_VERSION_MAJOR == 1) && (UPNP_VERSION_MINOR == 0)
"Content-Type: text/xml\r\n"
- "SOAPAction: \"%s\"\r\n"
-diff --git a/miniwget.c b/miniwget.c
-index d5b7970..05aeb9c 100644
---- a/miniwget.c
-+++ b/miniwget.c
+diff --git a/src/miniwget.c b/src/miniwget.c
+index e76a5e5..0cc36fe 100644
+--- a/src/miniwget.c
++++ b/src/miniwget.c
@@ -444,7 +444,7 @@ miniwget3(const char * host,
"GET %s HTTP/%s\r\n"
"Host: %s:%d\r\n"
"Connection: Close\r\n"
-- "User-Agent: " OS_STRING ", " UPNP_VERSION_STRING ", MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
+- "User-Agent: " OS_STRING " " UPNP_VERSION_STRING " MiniUPnPc/" MINIUPNPC_VERSION_STRING "\r\n"
+ "User-Agent: " UPNP_VERSION_STRING "\r\n"
"\r\n",
diff --git a/depends/patches/miniupnpc/fix_windows_snprintf.patch b/depends/patches/miniupnpc/fix_windows_snprintf.patch
new file mode 100644
index 0000000000..ff9e26231e
--- /dev/null
+++ b/depends/patches/miniupnpc/fix_windows_snprintf.patch
@@ -0,0 +1,25 @@
+commit a1e9de80ab99b4c956a6a4e21d3e0de6f7a1014d
+Author: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
+Date: Sat Apr 20 15:14:47 2024 +0100
+
+ Fix macro expression that guards `snprintf` for Windows
+
+ Otherwise, the `snprintf` is still wrongly emulated for the following
+ cases:
+ - mingw-w64 6.0.0 or new with ucrt
+ - mingw-w64 8.0.0 or new with iso c ext
+
+--- a/src/win32_snprintf.h
++++ b/src/win32_snprintf.h
+@@ -23,9 +23,9 @@
+ (defined(_MSC_VER) && _MSC_VER < 1900) /* Visual Studio older than 2015 */ || \
+ (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && defined(__NO_ISOCEXT)) /* mingw32 without iso c ext */ || \
+ (defined(__MINGW64_VERSION_MAJOR) && /* mingw-w64 not ... */ !( \
+- (defined (__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO != 0)) /* ... with ansi stdio */ || \
++ (defined (__USE_MINGW_ANSI_STDIO) && __USE_MINGW_ANSI_STDIO != 0) /* ... with ansi stdio */ || \
+ (__MINGW64_VERSION_MAJOR >= 6 && defined(_UCRT)) /* ... at least 6.0.0 with ucrt */ || \
+- (__MINGW64_VERSION_MAJOR >= 8 && !defined(__NO_ISOCEXT)) /* ... at least 8.0.0 with iso c ext */ || \
++ (__MINGW64_VERSION_MAJOR >= 8 && !defined(__NO_ISOCEXT))) /* ... at least 8.0.0 with iso c ext */ || \
+ 0) || \
+ 0)
+
diff --git a/depends/patches/miniupnpc/no_libtool.patch b/depends/patches/miniupnpc/no_libtool.patch
deleted file mode 100644
index bb7d4a87ef..0000000000
--- a/depends/patches/miniupnpc/no_libtool.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -ruN miniupnpc-2.2.2/Makefile miniupnpc-2.2.2.new/Makefile
---- miniupnpc-2.2.2/Makefile 2020-11-27 18:25:02.000000000 +0000
-+++ miniupnpc-2.2.2.new/Makefile 2024-01-23 20:58:08.387188527 +0000
-@@ -298,11 +298,7 @@
- makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
-
- $(LIBRARY): $(LIBOBJS)
--ifneq (, $(findstring darwin, $(OS)))
-- $(LIBTOOL) -static -o $@ $?
--else
- $(AR) crs $@ $?
--endif
-
- $(SHAREDLIBRARY): $(LIBOBJS)
- ifneq (, $(findstring darwin, $(OS)))
diff --git a/depends/patches/miniupnpc/respect_mingw_cflags.patch b/depends/patches/miniupnpc/respect_mingw_cflags.patch
deleted file mode 100644
index a44580ddab..0000000000
--- a/depends/patches/miniupnpc/respect_mingw_cflags.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-commit fec515a7ac9991a0ee91068fda046b54b191155e
-Author: fanquake <fanquake@gmail.com>
-Date: Wed Jul 27 15:52:37 2022 +0100
-
- build: respect CFLAGS in makefile.mingw
-
- Similar to the other Makefile.
-
- Cherry-pick of https://github.com/miniupnp/miniupnp/pull/619.
-
-diff --git a/Makefile.mingw b/Makefile.mingw
-index 2bff7bd..88430d2 100644
---- a/Makefile.mingw
-+++ b/Makefile.mingw
-@@ -19,7 +19,7 @@ else
- RM = rm -f
- endif
- #CFLAGS = -Wall -g -DDEBUG -D_WIN32_WINNT=0X501
--CFLAGS = -Wall -W -Wstrict-prototypes -Os -DNDEBUG -D_WIN32_WINNT=0X501
-+CFLAGS ?= -Wall -W -Wstrict-prototypes -Os -DNDEBUG -D_WIN32_WINNT=0X501
- LDLIBS = -lws2_32 -liphlpapi
- # -lwsock32
- # -liphlpapi is needed for GetBestRoute() and GetIpAddrTable()