diff --git a/deps-packaging/openssl/0001-Explicitly-define-SIO_UDP_NETRESET-for-MinGW-builds.patch b/deps-packaging/openssl/0001-Explicitly-define-SIO_UDP_NETRESET-for-MinGW-builds.patch new file mode 100644 index 000000000..18a8f94a7 --- /dev/null +++ b/deps-packaging/openssl/0001-Explicitly-define-SIO_UDP_NETRESET-for-MinGW-builds.patch @@ -0,0 +1,42 @@ +From 40d8060c0e8af7c7d3f0d70a7e2d3bf96a15fc10 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alexander=20Hansen=20F=C3=A6r=C3=B8y?= +Date: Wed, 28 Jan 2026 17:55:02 +0100 +Subject: [PATCH 001/670] Explicitly define `SIO_UDP_NETRESET` for MinGW + builds. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch explicitly defines the value `SIO_UDP_NETRESET` according to +both what Windows and ReactOS does. + +Fixes: #29818. + +Reviewed-by: Eugene Syromiatnikov +Reviewed-by: Saša Nedvědický +MergeDate: Thu Feb 5 08:54:17 2026 +(Merged from https://github.com/openssl/openssl/pull/29826) +--- + ssl/quic/quic_reactor.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/ssl/quic/quic_reactor.c b/ssl/quic/quic_reactor.c +index a754f28..deec428 100644 +--- a/ssl/quic/quic_reactor.c ++++ b/ssl/quic/quic_reactor.c +@@ -76,6 +76,12 @@ void ossl_quic_reactor_cleanup(QUIC_REACTOR *rtor) + } + + #if defined(OPENSSL_SYS_WINDOWS) ++ ++/* Work around for MinGW builds. */ ++#if defined(__MINGW32__) && !defined(SIO_UDP_NETRESET) ++#define SIO_UDP_NETRESET _WSAIOW(IOC_VENDOR, 15) ++#endif ++ + /* + * On Windows recvfrom() may return WSAECONNRESET when destination port + * used in preceding call to sendto() is no longer reachable. The reset +-- +2.52.0 + diff --git a/deps-packaging/openssl/_set_printf_count_output.patch b/deps-packaging/openssl/_set_printf_count_output.patch deleted file mode 100644 index 1943b5a76..000000000 --- a/deps-packaging/openssl/_set_printf_count_output.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN openssl-3.6.0/test/bioprinttest.c openssl-3.6.0-modified/test/bioprinttest.c ---- openssl-3.6.0/test/bioprinttest.c 2025-10-01 14:11:48.000000000 +0200 -+++ openssl-3.6.0-modified/test/bioprinttest.c 2025-10-07 10:59:36.919916485 +0200 -@@ -542,7 +542,7 @@ - ptrdiff_t t; - } n = { 0 }, std_n = { 0 }; - --#if defined(OPENSSL_SYS_WINDOWS) -+#if defined(OPENSSL_SYS_WINDOWS) && !defined(__MINGW32__) /* MinGW doesn't have _set_printf_count_output */ - /* - * MS CRT is special and throws an exception when %n is used even - * in non-*_s versions of printf routines, and there is a special function diff --git a/deps-packaging/openssl/mingw/debian/rules b/deps-packaging/openssl/mingw/debian/rules index c6e940178..66e49dc93 100755 --- a/deps-packaging/openssl/mingw/debian/rules +++ b/deps-packaging/openssl/mingw/debian/rules @@ -22,7 +22,7 @@ endif build: build-stamp build-stamp: dh_testdir - patch -p1 < $(CURDIR)/_set_printf_count_output.patch + patch -p1 < $(CURDIR)/0001-Explicitly-define-SIO_UDP_NETRESET-for-MinGW-builds.patch # Removed "no-psk" from the options, mingw builds breaks with it CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- ./Configure \