From 15ef2e6351fdfb9b01b5403583c97a1e931baa16 Mon Sep 17 00:00:00 2001 From: Devon Loehr Date: Tue, 1 Oct 2024 10:22:39 -0400 Subject: [PATCH] Replace NTDDI_WIN11_GE with its value Undefined constants are treated as 0 by the preprocessor, which causes the check to trivially return true for previous SDK versions. Replace the constant with its value (from the newest SDK version) instead, --- src/sysinfo.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sysinfo.cc b/src/sysinfo.cc index 2ee52c0d1..714859826 100644 --- a/src/sysinfo.cc +++ b/src/sysinfo.cc @@ -354,7 +354,8 @@ std::vector GetCacheSizesWindows() { C.type = "Unknown"; switch (cache.Type) { // Windows SDK version >= 10.0.26100.0 -#if NTDDI_VERSION >= NTDDI_WIN11_GE +// 0x0A000010 is the value of NTDDI_WIN11_GE +#if NTDDI_VERSION >= 0x0A000010 case CacheUnknown: break; #endif