c11/threads: Include thr/xtimec.h for xtime definition when building with MSVC.
[mesa.git] / include / c11 / threads.h
index 45823df35b23e41ee4487eb47a56b2f4acfa3952..573348d8091777c340b18ecd986c972339b7eaa3 100644 (file)
@@ -30,6 +30,9 @@
 #define EMULATED_THREADS_H_INCLUDED_
 
 #include <time.h>
+#ifdef _MSC_VER
+#include <thr/xtimec.h>  // for xtime
+#endif
 
 #ifndef TIME_UTC
 #define TIME_UTC 1
 typedef void (*tss_dtor_t)(void*);
 typedef int (*thrd_start_t)(void*);
 
+#ifndef _MSC_VER
 struct xtime {
     time_t sec;
     long nsec;
 };
 typedef struct xtime xtime;
+#endif
 
 
 /*-------------------- enumeration constants --------------------*/