浏览代码

port r14519 from 1.1: Also look for struct timespec in sys/stat.h, for mingw versions which use the __need_timespec logic

Samuel Thibault 10 年之前
父节点
当前提交
8e9964b224
共有 2 个文件被更改,包括 7 次插入2 次删除
  1. 6 2
      configure.ac
  2. 1 0
      include/pthread_win32/pthread.h

+ 6 - 2
configure.ac

@@ -208,8 +208,12 @@ else
     AC_CHECK_LIB([pthread], [pthread_create])
 fi
 AC_CHECK_TYPES([struct timespec], 
-	       AC_DEFINE(STARPU_HAVE_STRUCT_TIMESPEC,[],[struct timespec is defined by time.h]),
-	       [], [#include <time.h>])
+	       AC_DEFINE(STARPU_HAVE_STRUCT_TIMESPEC,[],[struct timespec is defined]),
+	       [], [
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
+])
 
 AC_SEARCH_LIBS([sqrt],[m],,AC_MSG_ERROR([math library unavailable]))
 AC_HAVE_LIBRARY([ws2_32])

+ 1 - 0
include/pthread_win32/pthread.h

@@ -33,6 +33,7 @@ extern "C" {
 
 #include <windows.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <time.h>
 #include <stdio.h>
 #include <errno.h>