From 11b86dac2d958a52c2edc64a4a1530ae1af249e2 Mon Sep 17 00:00:00 2001 From: Marat Abrarov Date: Mon, 11 Mar 2024 21:59:24 +0300 Subject: [PATCH] Avoid inclusion of rarely used Windows SDK headers which can cause conflict with other code using Windows SDK. 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