Pārlūkot izejas kodu

pthread: Use a definition only if we have the old toolchain

Anton Maklakov 7 gadi atpakaļ
vecāks
revīzija
a567b6c1f6
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      components/newlib/platform_include/pthread.h

+ 4 - 0
components/newlib/platform_include/pthread.h

@@ -16,8 +16,12 @@
 
 #include <sys/types.h>
 #include <sys/time.h>
+#include <sys/features.h>
 
+// Remove this when GCC 5.2.0 is no longer supported
+#ifndef _POSIX_TIMEOUTS
 #define _POSIX_TIMEOUTS     // For pthread_mutex_timedlock
+#endif
 
 #include_next <pthread.h>