fix compilation errors on Debian GNU/Hurd
Apparently on hurd-i386 __GLIBC__ is defined, but the pthread implementation is special and cannot be used with constexpr. Hence exclude __gnu_hurd__.
This commit is contained in:
parent
8454083efa
commit
db21d7de0b
src/thread
@ -43,7 +43,7 @@ class PosixCond {
|
|||||||
pthread_cond_t cond;
|
pthread_cond_t cond;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#ifdef __GLIBC__
|
#if defined(__GLIBC__) && !defined(__gnu_hurd__)
|
||||||
/* optimized constexpr constructor for pthread implementations
|
/* optimized constexpr constructor for pthread implementations
|
||||||
that support it */
|
that support it */
|
||||||
constexpr PosixCond() noexcept:cond(PTHREAD_COND_INITIALIZER) {}
|
constexpr PosixCond() noexcept:cond(PTHREAD_COND_INITIALIZER) {}
|
||||||
|
@ -41,7 +41,7 @@ class PosixMutex {
|
|||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#ifdef __GLIBC__
|
#if defined(__GLIBC__) && !defined(__gnu_hurd__)
|
||||||
/* optimized constexpr constructor for pthread implementations
|
/* optimized constexpr constructor for pthread implementations
|
||||||
that support it */
|
that support it */
|
||||||
constexpr PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
|
constexpr PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user