From 39afcefb6413b773b9f464689e994698a7a2ddc8 Mon Sep 17 00:00:00 2001 From: Marat Abrarov Date: Tue, 16 Apr 2024 11:47:28 +0300 Subject: [PATCH] Avoid inclusion of rarely used Windows SDK headers which can cause conflict with other code using Windows SDK. (#157) Signed-off-by: Marat Abrarov --- include/boost/stacktrace/detail/frame_msvc.ipp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/boost/stacktrace/detail/frame_msvc.ipp b/include/boost/stacktrace/detail/frame_msvc.ipp index ccb34df..ce0557b 100644 --- a/include/boost/stacktrace/detail/frame_msvc.ipp +++ b/include/boost/stacktrace/detail/frame_msvc.ipp @@ -18,7 +18,17 @@ #include #include #include + +#ifdef WIN32_LEAN_AND_MEAN +#include +#else +// Prevent inclusion of extra Windows SDK headers which can cause conflict +// with other code using Windows SDK +#define WIN32_LEAN_AND_MEAN #include +#undef WIN32_LEAN_AND_MEAN +#endif + #include "dbgeng.h" #include