diff options
author | Florian Schlichting <fsfs@debian.org> | 2018-10-31 12:15:11 +0100 |
---|---|---|
committer | Florian Schlichting <fsfs@debian.org> | 2018-10-31 12:24:34 +0100 |
commit | db21d7de0b95a0634a426fbb7f6bca1ee0e1a5c9 (patch) | |
tree | b0b8098b6d491062c39c83b96c9b8baf4606eafc /src/thread | |
parent | 8454083efae0f49fa0fc5282e8c890e23a669b59 (diff) |
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__.
Diffstat (limited to 'src/thread')
-rw-r--r-- | src/thread/PosixCond.hxx | 2 | ||||
-rw-r--r-- | src/thread/PosixMutex.hxx | 2 |
2 files changed, 2 insertions, 2 deletions
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) {} |