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 {
Cond cond;
bool pending;
#ifndef WIN32
#if !defined(WIN32) && !defined(__BIONIC__)
constexpr
#endif
notify():pending(false) {}
......
......@@ -41,7 +41,10 @@ class PosixCond {
pthread_cond_t cond;
public:
constexpr PosixCond():cond(PTHREAD_COND_INITIALIZER) {}
#ifndef __BIONIC__
constexpr
#endif
PosixCond():cond(PTHREAD_COND_INITIALIZER) {}
PosixCond(const PosixCond &other) = delete;
PosixCond &operator=(const PosixCond &other) = delete;
......
......@@ -41,7 +41,10 @@ class PosixMutex {
pthread_mutex_t mutex;
public:
constexpr PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
#ifndef __BIONIC__
constexpr
#endif
PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
PosixMutex(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