aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Support/Unix/Process.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/Unix/Process.inc b/lib/Support/Unix/Process.inc
index a525538f78..c6dd3c0dc5 100644
--- a/lib/Support/Unix/Process.inc
+++ b/lib/Support/Unix/Process.inc
@@ -69,7 +69,7 @@ static std::pair<TimeValue, TimeValue> getRUsageTimes() {
}
TimeValue self_process::get_user_time() const {
-#ifdef _POSIX_CPUTIME
+#if _POSIX_TIMERS > 0 && defined(_POSIX_CPUTIME)
// Try to get a high resolution CPU timer.
struct timespec TS;
if (::clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &TS) == 0)