this function is considered optional for POSIX and not implemented on Illumos
Reference: https://www.gnu.org/software/gnulib/manual/html_node/pthread_005fgetcpuclockid.html According to https://github.com/cpredef/predef/blob/master/OperatingSystems.md Illumos is identified by __illumos__ macro available since gcc-11 --- src/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clock.c b/src/clock.c index ec2133c8b..f484c2d9c 100644 --- a/src/clock.c +++ b/src/clock.c @@ -135,7 +135,7 @@ uint64_t now_cpu_time_thread(int thr) /* set the clock source for the local thread */ void clock_set_local_source(void) { -#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) && defined(_POSIX_THREAD_CPUTIME) +#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) && defined(_POSIX_THREAD_CPUTIME) && !defined(__illumos__) #ifdef USE_THREAD pthread_getcpuclockid(pthread_self(), &per_thread_clock_id[tid]); #else -- 2.45.0