summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r--llvm/lib/Support/Unix/Process.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Unix/Process.inc b/llvm/lib/Support/Unix/Process.inc
index a525538f78b..c6dd3c0dc55 100644
--- a/llvm/lib/Support/Unix/Process.inc
+++ b/llvm/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)
OpenPOWER on IntegriCloud