Parcourir la source

port r14747 from 1.2: Also define struct timespec when building with msvc on windows

Samuel Thibault il y a 10 ans
Parent
commit
cd12779088
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      include/pthread_win32/pthread.h
  2. 1 1
      include/starpu_util.h

+ 1 - 1
include/pthread_win32/pthread.h

@@ -274,7 +274,7 @@ typedef struct {
 } pthread_cond_t;
 #define PTHREAD_COND_INITIALIZER { NULL, 0}
 
-#ifndef STARPU_HAVE_STRUCT_TIMESPEC
+#if !defined(STARPU_HAVE_STRUCT_TIMESPEC) || defined(_MSC_VER)
 #ifndef STARPU_TIMESPEC_DEFINED
 #define STARPU_TIMESPEC_DEFINED 1
 struct timespec {

+ 1 - 1
include/starpu_util.h

@@ -312,7 +312,7 @@ double starpu_timing_now(void);
 #if !defined(_MSC_VER) || defined(BUILDING_STARPU)
 #include <pthread.h>
 #endif
-#ifndef STARPU_HAVE_STRUCT_TIMESPEC
+#if !defined(STARPU_HAVE_STRUCT_TIMESPEC) || defined(_MSC_VER)
 /* If it didn't get defined in the standard places, then define it ourself */
 #ifndef STARPU_TIMESPEC_DEFINED
 #define STARPU_TIMESPEC_DEFINED 1