[Pkg-mpd-commits] [pkg-mpd] 07/13: Add hurd_pthread.patch
Florian Schlichting
fsfs at moszumanska.debian.org
Tue Dec 13 20:46:09 UTC 2016
This is an automated email from the git hooks/post-receive script.
fsfs pushed a commit to branch master
in repository pkg-mpd.
commit d33b258b96ef0d52811fe80f4e68bd0cd7076aca
Author: Florian Schlichting <fsfs at debian.org>
Date: Tue Sep 13 00:53:39 2016 +0200
Add hurd_pthread.patch
---
debian/patches/hurd_pthread.patch | 38 ++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 39 insertions(+)
diff --git a/debian/patches/hurd_pthread.patch b/debian/patches/hurd_pthread.patch
new file mode 100644
index 0000000..f7fac4b
--- /dev/null
+++ b/debian/patches/hurd_pthread.patch
@@ -0,0 +1,38 @@
+Description: 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__.
+Author: Florian Schlichting <fsfs at debian.org>
+
+--- a/src/notify.hxx
++++ b/src/notify.hxx
+@@ -28,7 +28,7 @@
+ Cond cond;
+ bool pending;
+
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__gnu_hurd__)
+ constexpr
+ #endif
+ notify():pending(false) {}
+--- a/src/thread/PosixCond.hxx
++++ b/src/thread/PosixCond.hxx
+@@ -41,7 +41,7 @@
+ pthread_cond_t cond;
+
+ public:
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) && !defined(__gnu_hurd__)
+ /* optimized constexpr constructor for pthread implementations
+ that support it */
+ constexpr PosixCond():cond(PTHREAD_COND_INITIALIZER) {}
+--- a/src/thread/PosixMutex.hxx
++++ b/src/thread/PosixMutex.hxx
+@@ -41,7 +41,7 @@
+ 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) {}
diff --git a/debian/patches/series b/debian/patches/series
index 268e074..fb8195b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ bind-to-address-socket-activation.patch
prune-doc-data.patch
mpd.service.documentation.patch
mpd.service.documentation.user.patch
+hurd_pthread.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/pkg-mpd.git
More information about the Pkg-mpd-commits
mailing list