From dd61391c5d92353c69f2789d0dabbd3311fb2564 Mon Sep 17 00:00:00 2001 From: Matt Clarkson Date: Fri, 27 Mar 2015 13:41:50 +0000 Subject: [PATCH] Only include the correct platform headers --- src/benchmark.cc | 3 +++ src/colorprint.cc | 4 ++++ src/sysinfo.cc | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/src/benchmark.cc b/src/benchmark.cc index 65f3202d..855eb6d8 100644 --- a/src/benchmark.cc +++ b/src/benchmark.cc @@ -13,9 +13,12 @@ // limitations under the License. #include "benchmark/benchmark.h" +#include "internal_macros.h" #include +#ifndef OS_WINDOWS #include +#endif #include #include diff --git a/src/colorprint.cc b/src/colorprint.cc index d240a0ce..923bc87f 100644 --- a/src/colorprint.cc +++ b/src/colorprint.cc @@ -19,6 +19,10 @@ #include "commandlineflags.h" #include "internal_macros.h" +#ifdef OS_WINDOWS +#include +#endif + DECLARE_bool(color_print); namespace benchmark { diff --git a/src/sysinfo.cc b/src/sysinfo.cc index c820c0a8..cc4fb1b7 100644 --- a/src/sysinfo.cc +++ b/src/sysinfo.cc @@ -13,13 +13,19 @@ // limitations under the License. #include "sysinfo.h" +#include "internal_macros.h" +#ifdef OS_WINDOWS +#include +#include +#else #include #include #include // this header must be included before 'sys/sysctl.h' to avoid compilation error on FreeBSD #include #include #include +#endif #include #include