1--- misc/build/openssl-3.0.20/crypto/bio/bio_sock2.c 2+++ misc/build/openssl-3.0.20/crypto/bio/bio_sock2.c 3@@ -268,6 +268,10 @@ 4 * Therefore we always have to use setsockopt here. 5 */ 6 on = options & BIO_SOCK_V6_ONLY ? 1 : 0; 7+/* Windows < XP needs this: */ 8+# if !defined(IPPROTO_IPV6) 9+# define IPPROTO_IPV6 41 10+# endif 11 if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, 12 (const void *)&on, sizeof(on)) 13 != 0) { 14--- misc/build/openssl-3.0.20/crypto/init.c 15+++ misc/build/openssl-3.0.20/crypto/init.c 16@@ -133,7 +133,7 @@ 17 18 #if !defined(OPENSSL_USE_NODELETE) \ 19 && !defined(OPENSSL_NO_PINSHARED) 20-#if defined(DSO_WIN32) && !defined(_WIN32_WCE) 21+#if defined(DSO_WIN32) && !defined(_WIN32_WCE) && _WIN32_WINNT >= 0x0500 22 { 23 HMODULE handle = NULL; 24 BOOL ret; 25@@ -656,7 +656,7 @@ 26 #if !defined(OPENSSL_USE_NODELETE) \ 27 && !defined(OPENSSL_NO_PINSHARED) 28 { 29-#if defined(DSO_WIN32) && !defined(_WIN32_WCE) 30+#if defined(DSO_WIN32) && !defined(_WIN32_WCE) && _WIN32_WINNT >= 0x0500 31 HMODULE handle = NULL; 32 BOOL ret; 33 union { 34--- misc/build/openssl-3.0.20/crypto/threads_win.c 35+++ misc/build/openssl-3.0.20/crypto/threads_win.c 36@@ -54,7 +54,7 @@ 37 return NULL; 38 } 39 40-#if !defined(_WIN32_WCE) 41+#if !defined(_WIN32_WCE) && _WIN32_WINNT >= 0x0403 42 /* 0x400 is the spin count value suggested in the documentation */ 43 if (!InitializeCriticalSectionAndSpinCount(lock, 0x400)) { 44 OPENSSL_free(lock); 45