Commit db21d7de authored by Florian Schlichting's avatar Florian Schlichting

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__.
parent 8454083e
......@@ -43,7 +43,7 @@ class PosixCond {
pthread_cond_t cond;
public:
#ifdef __GLIBC__
#if defined(__GLIBC__) && !defined(__gnu_hurd__)
/* optimized constexpr constructor for pthread implementations
that support it */
constexpr PosixCond() noexcept:cond(PTHREAD_COND_INITIALIZER) {}
......
......@@ -41,7 +41,7 @@ class PosixMutex {
pthread_mutex_t mutex;
public:
#ifdef __GLIBC__
#if defined(__GLIBC__) && !defined(__gnu_hurd__)
/* optimized constexpr constructor for pthread implementations
that support it */
constexpr PosixMutex():mutex(PTHREAD_MUTEX_INITIALIZER) {}
......
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