From 6a34d9bfab578adb8671c9c5cc7d747262fb0fec Mon Sep 17 00:00:00 2001 From: John Biddiscombe Date: Mon, 28 Aug 2017 12:28:30 +0200 Subject: [PATCH] Only use sched_getcpu on linux machines --- plugins/parcelport/parcelport_logging.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/parcelport/parcelport_logging.hpp b/plugins/parcelport/parcelport_logging.hpp index 51d4cb153876..74ff385fdb67 100644 --- a/plugins/parcelport/parcelport_logging.hpp +++ b/plugins/parcelport/parcelport_logging.hpp @@ -19,7 +19,12 @@ #include // #include -#include +#if defined(__linux) || defined(__linux__) +# include +#else +# define sched_getcpu() '#' +#endif + // ------------------------------------------------------------------ // Set flags to help simplify the log defines