fix rsyscall handler: must not clobber errno from signal context
[oweals/musl.git] / src / thread / pthread_getspecific.c
index a6ca27d0d50169c3c905adab5dad08f285804662..b2a282c6e966c2d3d7381931f910fc7697f8292f 100644 (file)
@@ -2,7 +2,6 @@
 
 void *pthread_getspecific(pthread_key_t k)
 {
-       struct pthread *self = pthread_self();
-       if (!self->tsd) return 0;
+       struct pthread *self = __pthread_self();
        return self->tsd[k];
 }