fixed build on GNU/Hurd (ticket #761)

pull/13383/head
Alexander Shishkov 14 years ago
parent dfdbf0abd0
commit eae7921da6
  1. 6
      modules/core/src/system.cpp

@ -72,7 +72,7 @@
#include <sys/time.h> #include <sys/time.h>
#include <time.h> #include <time.h>
#ifdef __MACH__ #ifdef __MACH__ && defined __APPLE__
#include <mach/mach.h> #include <mach/mach.h>
#include <mach/mach_time.h> #include <mach/mach_time.h>
#endif #endif
@ -196,7 +196,7 @@ int64 getTickCount(void)
struct timespec tp; struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp); clock_gettime(CLOCK_MONOTONIC, &tp);
return (int64)tp.tv_sec*1000000000 + tp.tv_nsec; return (int64)tp.tv_sec*1000000000 + tp.tv_nsec;
#elif defined __MACH__ #elif defined __MACH__ && defined __APPLE__
return (int64)mach_absolute_time(); return (int64)mach_absolute_time();
#else #else
struct timeval tv; struct timeval tv;
@ -214,7 +214,7 @@ double getTickFrequency(void)
return (double)freq.QuadPart; return (double)freq.QuadPart;
#elif defined __linux || defined __linux__ #elif defined __linux || defined __linux__
return 1e9; return 1e9;
#elif defined __MACH__ #elif defined __MACH__ && defined __APPLE__
static double freq = 0; static double freq = 0;
if( freq == 0 ) if( freq == 0 )
{ {

Loading…
Cancel
Save