X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ferrno%2F__errno_location.c;h=a0185780c531cc2a21edf9b0d059eac1b4c6c071;hb=71e6be641fb1e4080c2bb901e83423546d0ad5af;hp=0a220b6383a6d1ff547164c34c075b4614cd65c7;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/errno/__errno_location.c b/src/errno/__errno_location.c index 0a220b63..a0185780 100644 --- a/src/errno/__errno_location.c +++ b/src/errno/__errno_location.c @@ -1,11 +1,9 @@ #include #include "libc.h" -#undef errno -int errno; - int *__errno_location(void) { + static int e; if (libc.errno_location) return libc.errno_location(); - return &errno; + return &e; }