X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Finternal%2Flibc.c;h=954efedf8b04eee03e09d26b36563097ef2c65db;hp=5e8e9d95311f346013ce0c12c99f474fd98ea0ab;hb=d89c9e8a63018810bb6a3e2ae55604996cc21e7b;hpb=4ee039f3545976f9e3e25a7e5d7b58f1f2316dc3 diff --git a/src/internal/libc.c b/src/internal/libc.c index 5e8e9d95..954efedf 100644 --- a/src/internal/libc.c +++ b/src/internal/libc.c @@ -1,3 +1,11 @@ #include "libc.h" -struct libc libc; +#ifdef __PIC__ +struct __libc *__libc_loc() +{ + static struct __libc __libc; + return &__libc; +} +#else +struct __libc __libc; +#endif