You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-sound/linuxsampler/files/linuxsampler-2.0.0-nptl-har...

16 lines
654 B

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