diff --git a/include/fmt/format.cc b/include/fmt/format.cc index e41f2cba..97192d85 100644 --- a/include/fmt/format.cc +++ b/include/fmt/format.cc @@ -22,6 +22,9 @@ #endif #if FMT_USE_WINDOWS_H +# if !defined(FMT_HEADER_ONLY) && !defined(WIN32_LEAN_AND_MEAN) +# define WIN32_LEAN_AND_MEAN +# endif # if defined(NOMINMAX) || defined(FMT_WIN_MINMAX) # include # else diff --git a/include/fmt/posix.cc b/include/fmt/posix.cc index a3c076ca..a7a255ac 100644 --- a/include/fmt/posix.cc +++ b/include/fmt/posix.cc @@ -19,6 +19,9 @@ #ifndef _WIN32 # include #else +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif # include # include