Преглед на файлове

Include pthread.h when using GOOGLE_PROTOBUF_NO_THREADLOCAL.

When GOOGLE_PROTOBUF_NO_THREADLOCAL is defined, classes that depend on
pthread functions are included (such as ThreadLocalStorage).
Tom Hughes преди 10 години
родител
ревизия
60c5222287
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/google/protobuf/stubs/platform_macros.h

+ 2 - 0
src/google/protobuf/stubs/platform_macros.h

@@ -115,6 +115,8 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR
 // TLS support on android.
 // TLS support on android.
 // iOS also does not support the __thread keyword.
 // iOS also does not support the __thread keyword.
 #define GOOGLE_PROTOBUF_NO_THREADLOCAL
 #define GOOGLE_PROTOBUF_NO_THREADLOCAL
+
+#include <pthread.h>
 #endif
 #endif
 
 
 #endif  // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_
 #endif  // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_