X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ferrno%2F__errno_location.c;h=7172a1be39dbb1caf86715904552389083e2061b;hb=2488d31f5a946e63e40058baf29fd2991343ea6f;hp=a0185780c531cc2a21edf9b0d059eac1b4c6c071;hpb=71e6be641fb1e4080c2bb901e83423546d0ad5af;p=musl diff --git a/src/errno/__errno_location.c b/src/errno/__errno_location.c index a0185780..7172a1be 100644 --- a/src/errno/__errno_location.c +++ b/src/errno/__errno_location.c @@ -1,9 +1,6 @@ -#include -#include "libc.h" +#include "pthread_impl.h" int *__errno_location(void) { - static int e; - if (libc.errno_location) return libc.errno_location(); - return &e; + return &__pthread_self()->errno_val; }