util/env_posix.cc: fix #elif check for __MACH__

Fix '#elif with no expression' add defined() to check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
main
Danny Al-Gaaf 10 years ago
parent c86e5d7b93
commit 87c7d49d67
  1. 2
      util/env_posix.cc

@ -1409,7 +1409,7 @@ class PosixEnv : public Env {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return static_cast<uint64_t>(ts.tv_sec) * 1000000000 + ts.tv_nsec;
#elif __MACH__
#elif defined(__MACH__)
clock_serv_t cclock;
mach_timespec_t ts;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);

Loading…
Cancel
Save