Quellcode durchsuchen

Do not unconditionally include unistd.h

Samuel Thibault vor 10 Jahren
Ursprung
Commit
f17e03355e
2 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 2 0
      include/pthread_win32/pthread.h
  2. 2 0
      include/starpu_util.h

+ 2 - 0
include/pthread_win32/pthread.h

@@ -34,7 +34,9 @@ extern "C" {
 #include <windows.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <time.h>
 #include <stdio.h>
 #include <errno.h>

+ 2 - 0
include/starpu_util.h

@@ -305,7 +305,9 @@ double starpu_timing_now(void);
 /* Try to fetch the system definition of timespec */
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <time.h>
 #if !defined(_MSC_VER) || defined(BUILDING_STARPU)
 #include <pthread.h>