mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 06:10:12 +01:00
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: 4913215d14 ("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>
This commit is contained in:
parent
8bf590b46b
commit
9661fc9cdb
1 changed files with 1 additions and 1 deletions
|
|
@ -149,7 +149,7 @@ util_get_L3_for_pinned_thread(thrd_t thread, unsigned cores_per_L3)
|
|||
static inline int64_t
|
||||
u_thread_get_time_nano(thrd_t thread)
|
||||
{
|
||||
#if defined(HAVE_PTHREAD)
|
||||
#if defined(HAVE_PTHREAD) && !defined(__APPLE__)
|
||||
struct timespec ts;
|
||||
clockid_t cid;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue