X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ferrno%2F__errno_location.c;h=7f9d6027a276a0b5574362f0e9aa547fed213523;hb=595416b11dfbc82d40a59d0edd7e3b04ba7a2d6d;hp=a0185780c531cc2a21edf9b0d059eac1b4c6c071;hpb=71e6be641fb1e4080c2bb901e83423546d0ad5af;p=musl diff --git a/src/errno/__errno_location.c b/src/errno/__errno_location.c index a0185780..7f9d6027 100644 --- a/src/errno/__errno_location.c +++ b/src/errno/__errno_location.c @@ -1,9 +1,9 @@ #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; } + +weak_alias(__errno_location, ___errno_location);