From: Alexander Shishkov Date: Tue, 31 May 2011 15:22:22 +0000 (+0000) Subject: fixed build on GNU/Hurd (ticket #761) X-Git-Tag: submit/tizen/20180620.034203~3^2~7187 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eae7921da61cc5d9df94abbc7455a9b899daa0b3;p=platform%2Fupstream%2Fopencv.git fixed build on GNU/Hurd (ticket #761) --- diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index 78ae6fa08c..a823725f74 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 ) {