diff options
author | Tom Hughes <tom@airtime.com> | 2015-07-30 09:30:31 -0700 |
---|---|---|
committer | Tom Hughes <tom@airtime.com> | 2015-07-30 09:30:31 -0700 |
commit | c6095505dc0c1da8a85e4bd9c50917c6286c9724 (patch) | |
tree | 971c6dcae82a06ce3f267239129f99abc0805977 /src | |
parent | 93ba9333639b45969138dde2caa647243b8159d4 (diff) |
Move pthread include.
Based on pull request feedback. See commit 60c5222 for why the pthread
header is necessary.
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/stubs/mutex.h | 4 | ||||
-rw-r--r-- | src/google/protobuf/stubs/platform_macros.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/google/protobuf/stubs/mutex.h b/src/google/protobuf/stubs/mutex.h index 2cce0561..7ef1cb69 100644 --- a/src/google/protobuf/stubs/mutex.h +++ b/src/google/protobuf/stubs/mutex.h @@ -30,6 +30,10 @@ #ifndef GOOGLE_PROTOBUF_STUBS_MUTEX_H_ #define GOOGLE_PROTOBUF_STUBS_MUTEX_H_ +#ifdef GOOGLE_PROTOBUF_NO_THREADLOCAL +#include <pthread.h> +#endif + #include <google/protobuf/stubs/macros.h> // =================================================================== diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h index fcafcc14..9e0344d8 100644 --- a/src/google/protobuf/stubs/platform_macros.h +++ b/src/google/protobuf/stubs/platform_macros.h @@ -115,8 +115,6 @@ 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_ |