fix reference to libc struct in static tls init code
authorRich Felker <dalias@aerifal.cx>
Wed, 26 Dec 2012 02:51:11 +0000 (21:51 -0500)
committerRich Felker <dalias@aerifal.cx>
Wed, 26 Dec 2012 02:51:11 +0000 (21:51 -0500)
libc is the macro, __libc is the internal symbol, but under some
configurations on old/broken compilers, the symbol might not actually
exist and the libc macro might instead use __libc_loc() to obtain
access to the object.

src/env/__init_tls.c

index 3a1b1f5..eb2a6e4 100644 (file)
@@ -23,7 +23,7 @@ void *__copy_tls(unsigned char *mem)
        td = (pthread_t)mem;
        mem += sizeof(struct pthread);
 #else
-       mem += __libc.tls_size - sizeof(struct pthread);
+       mem += libc.tls_size - sizeof(struct pthread);
        mem -= (uintptr_t)mem & (align-1);
        td = (pthread_t)mem;
        td->dtv = dtv;