diff --git a/src/thread/PosixCond.hxx b/src/thread/PosixCond.hxx index c28147257..ab00a654f 100644 --- a/src/thread/PosixCond.hxx +++ b/src/thread/PosixCond.hxx @@ -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) {} diff --git a/src/thread/PosixMutex.hxx b/src/thread/PosixMutex.hxx index 7042dc8ec..37157d724 100644 --- a/src/thread/PosixMutex.hxx +++ b/src/thread/PosixMutex.hxx @@ -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) {}