Commit 8a57600f23 for openssl.org
commit 8a57600f2348a2a097127110c6db4730091e7c17
Author: Milan Broz <gmazyland@gmail.com>
Date: Mon Jun 29 13:59:16 2026 +0200
Use more recent default for _WIN32_WINNT
After the windows.h include optimization introduced in
commit 1eaf29ef6c, the _WIN32_WINNT default was changed, causing
performance regressions.
Currently, _WIN32_WINNT is defined as 0x0501, which means WinXP.
This causes the code to be compiled with WinXP-compatible code, notably
- without USE_RWLOCK
- using legacy thread implementation
- legacy RNG seeding (no BCryptGenRandom)
This patch increases the requirement to 0x600 (Windows Vista).
Note that code running on WinXP cannot currently be compiled with
any default configuration, as supported compilers generate executables
for Windows Vista and above.
If we provide some way to support WinXP, it can be done by
redefining _WIN32_WINNT.
Resolves: https://github.com/openssl/project/issues/2010
Fixes: 1eaf29ef6c "Remove direct includes of windows.h where possible"
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Wed Jul 1 09:14:18 2026
(Merged from https://github.com/openssl/openssl/pull/31774)
diff --git a/include/internal/e_os.h b/include/internal/e_os.h
index b54f4d5a70..444f888674 100644
--- a/include/internal/e_os.h
+++ b/include/internal/e_os.h
@@ -109,7 +109,7 @@
* 0x0603 // Windows 8.1
* 0x0A00 // Windows 10
*/
-#define _WIN32_WINNT 0x0501
+#define _WIN32_WINNT 0x0600
#endif
#include <windows.h>
#include <stdio.h>