Commit 9b7f492c authored by Max Kellermann's avatar Max Kellermann

thread/Posix{Mutex,Cond}: disable "constexpr" on Android

Bionic's pthread declarations are non-literal.
parent 6eda79d0
...@@ -28,7 +28,7 @@ struct notify { ...@@ -28,7 +28,7 @@ struct notify {
Cond cond; Cond cond;
bool pending; bool pending;
#ifndef WIN32 #if !defined(WIN32) && !defined(__BIONIC__)
constexpr constexpr
#endif #endif
notify():pending(false) {} notify():pending(false) {}
......
...@@ -41,7 +41,10 @@ class PosixCond { ...@@ -41,7 +41,10 @@ class PosixCond {
pthread_cond_t cond; pthread_cond_t cond;
public: public:
constexpr PosixCond():cond(PTHREAD_COND_INITIALIZER) {} #ifndef __BIONIC__
constexpr
#endif
PosixCond():cond(PTHREAD_COND_INITIALIZER) {}
PosixCond(const PosixCond &other) = delete; PosixCond(const PosixCond &other) = delete;
PosixCond &operator=(const PosixCond &other) = delete; PosixCond &operator=(const PosixCond &other) = delete;
......
...@@ -41,7 +41,10 @@ class PosixMutex { ...@@ -41,7 +41,10 @@ class PosixMutex {
pthread_mutex_t mutex; pthread_mutex_t mutex;
public: public:
constexpr PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {} #ifndef __BIONIC__
constexpr
#endif
PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
PosixMutex(const PosixMutex &other) = delete; PosixMutex(const PosixMutex &other) = delete;
PosixMutex &operator=(const PosixMutex &other) = delete; PosixMutex &operator=(const PosixMutex &other) = delete;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment