diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/os/os_thread.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index 322888b825f..f2629c5ffe5 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -165,7 +165,11 @@ pipe_tsd_set(pipe_tsd *tsd, void *value) static inline int64_t pipe_current_thread_get_time_nano(void) { - return u_thread_get_time_nano(thrd_current()); +#if defined(HAVE_PTHREAD) + return u_thread_get_time_nano(pthread_self()); +#else + return 0; +#endif } #endif /* OS_THREAD_H_ */ |