diff --git a/include/c11/threads.h b/include/c11/threads.h index 45823df35b2..573348d8091 100644 --- a/include/c11/threads.h +++ b/include/c11/threads.h @@ -30,6 +30,9 @@ #define EMULATED_THREADS_H_INCLUDED_ #include +#ifdef _MSC_VER +#include // for xtime +#endif #ifndef TIME_UTC #define TIME_UTC 1 @@ -41,11 +44,13 @@ 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 --------------------*/