From: Jonathan Gray Date: Sat, 30 Nov 2019 15:17:36 +0000 (+1100) Subject: util/u_thread: don't restrict u_thread_get_time_nano() to __linux__ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4913215d145e61c35b90fa3ed1dcad76a51d48e0;p=mesa.git util/u_thread: don't restrict u_thread_get_time_nano() to __linux__ pthread_getcpuclockid() and clock_gettime() are also available on at least OpenBSD, FreeBSD, NetBSD, DragonFly, Cygwin. Signed-off-by: Jonathan Gray Signed-off-by: Marek Olšák --- diff --git a/src/util/u_thread.h b/src/util/u_thread.h index 6fc923c10e6..461d30bdd12 100644 --- a/src/util/u_thread.h +++ b/src/util/u_thread.h @@ -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(__linux__) && defined(HAVE_PTHREAD) +#if defined(HAVE_PTHREAD) struct timespec ts; clockid_t cid;