summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-02-12 22:17:21 +0100
committerDavid Seifert <soap@gentoo.org>2016-02-12 22:17:35 +0100
commitc3f25a35664cfe0d06ff946157e2302fed763710 (patch)
tree1c6d1720df207d3a52712cd292e976c67c951e22 /media-sound/linuxsampler/files/linuxsampler-2.0.0-nptl-hardened.patch
parentdev-php/pecl-mailparse: Version bump (diff)
downloadgentoo-c3f25a35664cfe0d06ff946157e2302fed763710.tar.gz
gentoo-c3f25a35664cfe0d06ff946157e2302fed763710.tar.bz2
gentoo-c3f25a35664cfe0d06ff946157e2302fed763710.zip
media-sound/linuxsampler: Fix undefined behaviour in NPTL test
Gentoo-Bug: 537516 * EAPI=6 * Replace PTHREAD_CANCEL_ASYNCHRONOUS, which is undefined behaviour when used for a non-pure function Package-Manager: portage-2.2.27
Diffstat (limited to 'media-sound/linuxsampler/files/linuxsampler-2.0.0-nptl-hardened.patch')
-rw-r--r--media-sound/linuxsampler/files/linuxsampler-2.0.0-nptl-hardened.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/media-sound/linuxsampler/files/linuxsampler-2.0.0-nptl-hardened.patch b/media-sound/linuxsampler/files/linuxsampler-2.0.0-nptl-hardened.patch
new file mode 100644
index 000000000000..0c61f096c213
--- /dev/null
+++ b/media-sound/linuxsampler/files/linuxsampler-2.0.0-nptl-hardened.patch
@@ -0,0 +1,15 @@
+Fix breakage caused by undefined behaviour. Using PTHREAD_CANCEL_ASYNCHRONOUS
+is only allowed in pure functions.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=537516
+
+--- linuxsampler-2.0.0/m4/nptl_bug.m4
++++ linuxsampler-2.0.0/m4/nptl_bug.m4
+@@ -47,7 +47,7 @@
+ void* __pthread_launcher(void* p) {
+ // let the thread be killable under any circumstances
+ // (without this function call, this test always succeeds !)
+- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
++ pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
+
+ // this will block this 2nd thread, since we already
+ // locked this mutex by the main thread