Skip to content

Commit d54b3b9

Browse files
committed
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 DFHack#5147
1 parent 113aebc commit d54b3b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/MiscUtils.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ distribution.
3333
// We don't want min and max macros
3434
#define NOMINMAX
3535
#include <Windows.h>
36+
// Suppress warning which occurs in header on some WinSDK versions
37+
// See dfhack/dfhack#5147 for more information
38+
#pragma warning(push)
39+
#pragma warning(disable:4091)
3640
#include <DbgHelp.h>
41+
#pragma warning(pop)
3742
#else
3843
#include <sys/time.h>
3944
#include <ctime>

0 commit comments

Comments
 (0)