diff --git a/easy_profiler_core/event_trace_win.cpp b/easy_profiler_core/event_trace_win.cpp index c7d7349..871a797 100644 --- a/easy_profiler_core/event_trace_win.cpp +++ b/easy_profiler_core/event_trace_win.cpp @@ -61,7 +61,6 @@ #include #include #include -#include #include "profile_manager.h" #include "current_time.h" diff --git a/easy_profiler_core/profile_manager.cpp b/easy_profiler_core/profile_manager.cpp index 641a328..eb92e07 100644 --- a/easy_profiler_core/profile_manager.cpp +++ b/easy_profiler_core/profile_manager.cpp @@ -57,7 +57,10 @@ #include #include #include -#include + +#ifndef _WIN32 +# include +#endif #include "event_trace_win.h" #include "current_time.h" diff --git a/easy_profiler_core/profile_manager.h b/easy_profiler_core/profile_manager.h index 035e13a..963f9da 100644 --- a/easy_profiler_core/profile_manager.h +++ b/easy_profiler_core/profile_manager.h @@ -45,6 +45,12 @@ The Apache License, Version 2.0 (the "License"); #include +#ifdef _WIN32 +// Do not move this include to other place! +// It should be included before Windows.h which is included in spin_lock.h +# include +#endif // _WIN32 + #include "spin_lock.h" #include "outstream.h" #include "hashed_cstr.h"