File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ elseif(TARGET_ARCH_NAME MATCHES "^(armel|arm|armv6|arm64|loongarch64|riscv64|s39
116116 set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
117117 elseif (HAIKU)
118118 set_cache_value(HAVE_CLOCK_MONOTONIC_COARSE_EXITCODE 1)
119+ set_cache_value(HAVE_CLOCK_THREAD_CPUTIME_EXITCODE 0)
119120 set_cache_value(HAVE_PROCFS_STAT_EXITCODE 1)
120121 set_cache_value(HAVE_PROCFS_STATM_EXITCODE 1)
121122 endif ()
Original file line number Diff line number Diff line change 9292#cmakedefine01 HAVE_CLOCK_MONOTONIC
9393#cmakedefine01 HAVE_CLOCK_MONOTONIC_COARSE
9494#cmakedefine01 HAVE_CLOCK_GETTIME_NSEC_NP
95+ #cmakedefine01 HAVE_CLOCK_THREAD_CPUTIME
9596#cmakedefine01 HAVE_PTHREAD_CONDATTR_SETCLOCK
9697#cmakedefine01 MMAP_ANON_IGNORES_PROTECTION
9798#cmakedefine01 ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS
Original file line number Diff line number Diff line change @@ -401,6 +401,22 @@ int main()
401401 exit((ret == 0) ? 1 : 0);
402402}" HAVE_CLOCK_GETTIME_NSEC_NP)
403403
404+ set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_RT_LIBS} )
405+ check_cxx_source_runs("
406+ #include <stdlib.h>
407+ #include <time.h>
408+ #include <sys/time.h>
409+
410+ int main()
411+ {
412+ int ret;
413+ struct timespec ts;
414+ ret = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
415+
416+ exit(ret);
417+ }" HAVE_CLOCK_THREAD_CPUTIME)
418+ set (CMAKE_REQUIRED_LIBRARIES)
419+
404420check_cxx_source_runs("
405421#include <sys/types.h>
406422#include <sys/mman.h>
You can’t perform that action at this time.
0 commit comments