From eae7921da61cc5d9df94abbc7455a9b899daa0b3 Mon Sep 17 00:00:00 2001 From: Alexander Shishkov Date: Tue, 31 May 2011 15:22:22 +0000 Subject: [PATCH] fixed build on GNU/Hurd (ticket #761) --- modules/core/src/system.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index 78ae6fa..a823725 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -72,7 +72,7 @@ #include #include -#ifdef __MACH__ +#ifdef __MACH__ && defined __APPLE__ #include #include #endif @@ -196,7 +196,7 @@ int64 getTickCount(void) struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp); return (int64)tp.tv_sec*1000000000 + tp.tv_nsec; -#elif defined __MACH__ +#elif defined __MACH__ && defined __APPLE__ return (int64)mach_absolute_time(); #else struct timeval tv; @@ -214,7 +214,7 @@ double getTickFrequency(void) return (double)freq.QuadPart; #elif defined __linux || defined __linux__ return 1e9; -#elif defined __MACH__ +#elif defined __MACH__ && defined __APPLE__ static double freq = 0; if( freq == 0 ) { -- 2.7.4