This patch explicitly defines the value `SIO_UDP_NETRESET` according to
both what Windows and ReactOS does.
Fixes: #29818.
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Thu Feb 5 08:54:17 2026
(Merged from https://github.com/openssl/openssl/pull/29826)
}
#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