Procházet zdrojové kódy

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 před 10 roky
rodič
revize
8e9964b224
2 změnil soubory, kde provedl 7 přidání a 2 odebrání
  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>