From 430a831c200585b7a6df6389968161cea3a0f798 Mon Sep 17 00:00:00 2001 From: Alexander Duda Date: Thu, 3 Mar 2016 19:31:58 +0100 Subject: [PATCH] fix name clash in mach/policy.h and gps.h mach/policy is a system header included by rtt --- tasks/GPSDTask.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tasks/GPSDTask.cpp b/tasks/GPSDTask.cpp index a88afcd..e4e312d 100644 --- a/tasks/GPSDTask.cpp +++ b/tasks/GPSDTask.cpp @@ -1,4 +1,14 @@ -#include "GPSDTask.hpp" + +// workaround for name clash in +// usr/include/mach/policy.h and gpsd/3.15/include/gps.h +#ifdef __APPLE__ + #define policy_t mach_policy_t + #include "GPSDTask.hpp" + #undef policy_t +#else + #include "GPSDTask.hpp" +#endif + #include using namespace gps;