From 5dedbff2c68d5ff677b13a1273d4674e28e0a1b0 Mon Sep 17 00:00:00 2001 From: Nicholas McDaniel Date: Sat, 28 Dec 2024 19:37:05 -0500 Subject: [PATCH] Fix build on older versions of WinSDK Some versions of the Windows SDK (pre-8.1 are known) include a version of DbgHelp.h that trigger a warning upon compilation. To maintain compatability with these versions of the SDK, the warning is suppressed. Fixes #5147 --- library/MiscUtils.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/MiscUtils.cpp b/library/MiscUtils.cpp index be59e9f6aa..082657ea34 100644 --- a/library/MiscUtils.cpp +++ b/library/MiscUtils.cpp @@ -33,7 +33,12 @@ distribution. // We don't want min and max macros #define NOMINMAX #include + // Suppress warning which occurs in header on some WinSDK versions + // See dfhack/dfhack#5147 for more information + #pragma warning(push) + #pragma warning(disable:4091) #include + #pragma warning(pop) #else #include #include