util/u_thread: Restrict u_thread_get_time_nano on macOS.
authorVinson Lee <vlee@freedesktop.org>
Tue, 10 Dec 2019 07:09:58 +0000 (23:09 -0800)
committerVinson Lee <vlee@freedesktop.org>
Wed, 11 Dec 2019 05:35:47 +0000 (21:35 -0800)
commit9661fc9cdb42bc8d329feb30f3e80f511e60920e
tree7e19e68a2347ee4f1453a348fb78a183499cd391
parent8bf590b46be9a20aeaddaf3ad73ee33dde6865c7
util/u_thread: Restrict u_thread_get_time_nano on macOS.

macOS does not have pthread_getcpuclockid.

src/util/u_thread.h:156:4: error: implicit declaration of function 'pthread_getcpuclockid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   pthread_getcpuclockid(thread, &cid);
   ^

Fixes: 4913215d145e ("util/u_thread: don't restrict u_thread_get_time_nano() to __linux__")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2171
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Eric Engestrom <eric@engestrom.ch>
src/util/u_thread.h