[Mesa-dev] [PATCH] threads: fix MinGW build breakage

Jon Turney jon.turney at dronecode.org.uk
Fri Nov 10 13:00:51 UTC 2017


On 09/11/2017 21:41, Nicolai Hähnle wrote:
> Sorry for the mess.

I'm going to suggest that the fallback declaration of timespec_get() 
also needs to be provided for POSIX systems which don't have it.

Not noticed previously as it (or xtime_get()) doesn't seem to have had 
any users, prior to this series.

Patch attached.
-------------- next part --------------
From e04c7cfa3a3a560476d361a828070f7785da8bf0 Mon Sep 17 00:00:00 2001
From: Jon Turney <jon.turney at dronecode.org.uk>
Date: Fri, 10 Nov 2017 12:22:25 +0000
Subject: [PATCH] Also provide timespec_get fallback if a POSIX platform
 doesn't have it

... not just on Windows

Signed-off-by: Jon Turney <jon.turney at dronecode.org.uk>
---
 include/c11/threads_posix.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h
index 7bf6a0f6ef6..45cb6075e6e 100644
--- a/include/c11/threads_posix.h
+++ b/include/c11/threads_posix.h
@@ -382,7 +382,7 @@ tss_set(tss_t key, void *val)
 
 /*-------------------- 7.25.7 Time functions --------------------*/
 // 7.25.6.1
-#if 0
+#ifndef HAVE_TIMESPEC_GET
 static inline int
 timespec_get(struct timespec *ts, int base)
 {
-- 
2.15.0



More information about the mesa-dev mailing list