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:
Florian Schlichting 2018-10-31 12:15:11 +01:00
parent 8454083efa
commit db21d7de0b
2 changed files with 2 additions and 2 deletions

View File

@ -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) {}

View File

@ -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) {}