aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Tom Hughes <tom@airtime.com>2015-07-28 16:16:16 -0700
committerGravatar Tom Hughes <tom@airtime.com>2015-07-28 16:16:16 -0700
commit60c5222287356d36903ae0cde9ad8fa76752192f (patch)
tree9ce687e06e6163204bda2b23610c00c4e9a66ab9 /src
parentf642c5cfddbe54dcab5416178880c4e27c8ed4cd (diff)
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).
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/stubs/platform_macros.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h
index 9e0344d8..fcafcc14 100644
--- a/src/google/protobuf/stubs/platform_macros.h
+++ b/src/google/protobuf/stubs/platform_macros.h
@@ -115,6 +115,8 @@ GOOGLE_PROTOBUF_PLATFORM_ERROR
// TLS support on android.
// iOS also does not support the __thread keyword.
#define GOOGLE_PROTOBUF_NO_THREADLOCAL
+
+#include <pthread.h>
#endif
#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_