fix minor bugs due to incorrect threaded-predicate semantics
[musl] / src / thread / pthread_setcancelstate.c
index ebb6eba..ba2b231 100644 (file)
@@ -3,7 +3,7 @@
 int pthread_setcancelstate(int new, int *old)
 {
        if (new > 1U) return EINVAL;
-       if (libc.threaded) {
+       if (libc.main_thread) {
                struct pthread *self = __pthread_self();
                if (old) *old = self->canceldisable;
                self->canceldisable = new;