mirror of
git://git.musl-libc.org/musl
synced 2025-01-30 18:41:43 +00:00
fix reference to libc struct in static tls init code
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.
This commit is contained in:
parent
d12f2ed282
commit
e172c7b4df
2
src/env/__init_tls.c
vendored
2
src/env/__init_tls.c
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user