瀏覽代碼

Fix definition of struct timespec for some version of mingw

Samuel Thibault 10 年之前
父節點
當前提交
26132b4ec0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/starpu_util.h

+ 1 - 1
include/starpu_util.h

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