VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-08-13 15:12:21 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-08-13 15:12:21 +0200
commitc167799506f737b8d34133c824703291da797315 (patch)
tree52e88df727339b9c5060d811cce719a62149cefc /src
parent4f6039499903e7758c4cb05ed98821c62fb1fa2d (diff)
downloadVeraCrypt-c167799506f737b8d34133c824703291da797315.tar.gz
VeraCrypt-c167799506f737b8d34133c824703291da797315.zip
Windows: fix build failure for x86/x64 with newer Visual Studio that use Windows 10/11 SDK
We set Windows 8 as minimum API support fir Visual Studio 2015 and newer. Closes #1398
Diffstat (limited to 'src')
-rw-r--r--src/Common/Tcdefs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Common/Tcdefs.h b/src/Common/Tcdefs.h
index 93704e9a..a45cd009 100644
--- a/src/Common/Tcdefs.h
+++ b/src/Common/Tcdefs.h
@@ -349,7 +349,13 @@ extern BOOLEAN VC_KeAreAllApcsDisabled (VOID);
#ifdef _M_ARM64
# define _WIN32_WINNT 0x0A00
#else
-# define _WIN32_WINNT 0x0601 /* Does not apply to the driver */
+// for Visual Studio 2015 and later, set minimum Windows version to Windows 8
+// for old versions of Visual Studio, set minimum Windows version to Windows 7
+#if _MSC_VER >= 1900
+# define _WIN32_WINNT 0x0602
+#else
+# define _WIN32_WINNT 0x0601
+#endif
#endif
#endif