Skip to content

Commit 39afcef

Browse files
authored
Avoid inclusion of rarely used Windows SDK headers which can cause conflict with other code using Windows SDK. (#157)
Signed-off-by: Marat Abrarov <[email protected]>
1 parent d1b7a61 commit 39afcef

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/boost/stacktrace/detail/frame_msvc.ipp

+10
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@
1818
#include <boost/core/noncopyable.hpp>
1919
#include <boost/stacktrace/detail/to_dec_array.hpp>
2020
#include <boost/stacktrace/detail/to_hex_array.hpp>
21+
22+
#ifdef WIN32_LEAN_AND_MEAN
23+
#include <windows.h>
24+
#else
25+
// Prevent inclusion of extra Windows SDK headers which can cause conflict
26+
// with other code using Windows SDK
27+
#define WIN32_LEAN_AND_MEAN
2128
#include <windows.h>
29+
#undef WIN32_LEAN_AND_MEAN
30+
#endif
31+
2232
#include "dbgeng.h"
2333

2434
#include <mutex>

0 commit comments

Comments
 (0)