From e0190fe7a372d5d035ad510b3f59c13ec34d7db5 Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Thu, 9 Nov 2017 23:56:46 +0300 Subject: [PATCH] #0 Windows build --- easy_profiler_core/event_trace_win.cpp | 1 - easy_profiler_core/profile_manager.cpp | 5 ++++- easy_profiler_core/profile_manager.h | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) 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"