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