mirror of https://github.com/facebook/rocksdb.git
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>
This commit is contained in:
parent
c86e5d7b93
commit
87c7d49d67
|
@ -1409,7 +1409,7 @@ class PosixEnv : public Env {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
return static_cast<uint64_t>(ts.tv_sec) * 1000000000 + ts.tv_nsec;
|
return static_cast<uint64_t>(ts.tv_sec) * 1000000000 + ts.tv_nsec;
|
||||||
#elif __MACH__
|
#elif defined(__MACH__)
|
||||||
clock_serv_t cclock;
|
clock_serv_t cclock;
|
||||||
mach_timespec_t ts;
|
mach_timespec_t ts;
|
||||||
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
|
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
|
||||||
|
|
Loading…
Reference in New Issue