author | Rich Felker <dalias@aerifal.cx> | 2011年02月20日 22:30:06 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011年02月20日 22:30:06 -0500 |
commit | d89c9e8a63018810bb6a3e2ae55604996cc21e7b (patch) | |
tree | 294b84c7be389e049d478ca9a5777276f84c4a88 /src/internal/libc.c | |
parent | 4ee039f3545976f9e3e25a7e5d7b58f1f2316dc3 (diff) | |
download | musl-d89c9e8a63018810bb6a3e2ae55604996cc21e7b.tar.gz |
-rw-r--r-- | src/internal/libc.c | 10 |
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 |