From 87c7d49d6761d90129d8f63d20fe0b2a0accdc80 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 17 Mar 2015 12:03:11 +0100 Subject: [PATCH] util/env_posix.cc: fix #elif check for __MACH__ Fix '#elif with no expression' add defined() to check. Signed-off-by: Danny Al-Gaaf --- util/env_posix.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/env_posix.cc b/util/env_posix.cc index fa97b6c93..a2e1c714c 100644 --- a/util/env_posix.cc +++ b/util/env_posix.cc @@ -1409,7 +1409,7 @@ class PosixEnv : public Env { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); return static_cast(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);