Forráskód Böngészése

Fix definition of timespec: it is now defined in some w32api version, depending on some obscure toolchain conditions

Samuel Thibault 13 éve
szülő
commit
3f275cde36
1 módosított fájl, 3 hozzáadás és 0 törlés
  1. 3 0
      include/pthread_win32/pthread.h

+ 3 - 0
include/pthread_win32/pthread.h

@@ -32,6 +32,7 @@ extern "C" {
 #endif /* __cplusplus */
 
 #include <windows.h>
+#include <sys/types.h>
 #undef interface
 #include <stdio.h>
 #include <errno.h>
@@ -269,6 +270,7 @@ typedef struct {
 } pthread_cond_t;
 #define PTHREAD_COND_INITIALIZER { NULL, 0}
 
+#ifndef _TIMESPEC_DEFINED
 #ifndef STARPU_TIMESPEC_DEFINED
 #define STARPU_TIMESPEC_DEFINED 1
 struct timespec {
@@ -276,6 +278,7 @@ struct timespec {
   long    tv_nsec; /* Nanoseconds */
 };
 #endif /* STARPU_TIMESPEC_DEFINED */
+#endif
 
 typedef unsigned pthread_condattr_t;