aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-05-18 17:32:41 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-05-18 16:15:02 +0000
commit78d8fdd53be9cb181606547dc72ab72185a3e0bd (patch)
treeb248c3821cefb7a022085f0775f0eebb8555a48d
parentfd5d08781be217a006fa03375de7928b05955431 (diff)
Fix CLOCK_REALTIME not being available on macOS SDK < 10.11
Just define it to a dummy value, it's not used anyway. Amends 2aa3131bef6444a800f6e6259cecf44851eb0454 . Change-Id: Ib11e4158b274ef6b49013107cc0815007b6544d6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/lib/corelib/tools/filetime.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/corelib/tools/filetime.cpp b/src/lib/corelib/tools/filetime.cpp
index 8b34ba81e..14680ef6e 100644
--- a/src/lib/corelib/tools/filetime.cpp
+++ b/src/lib/corelib/tools/filetime.cpp
@@ -57,6 +57,11 @@ template<> struct CompileTimeAssert<true> {};
#ifdef APPLE_CUSTOM_CLOCK_GETTIME
#include <sys/time.h>
+
+#ifndef CLOCK_REALTIME
+#define CLOCK_REALTIME 0
+#endif
+
// clk_id isn't used, only the CLOCK_REALTIME case is implemented.
int clock_gettime(int /*clk_id*/, struct timespec *t)
{