mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
Only use USE___THREAD when defined
This commit is contained in:
14
elf/rtld.c
14
elf/rtld.c
@@ -779,7 +779,12 @@ cannot allocate TLS data structures for initial thread");
|
||||
|
||||
/* And finally install it for the main thread. If ld.so itself uses
|
||||
TLS we know the thread pointer was initialized earlier. */
|
||||
const char *lossage = TLS_INIT_TP (tcbp, USE___THREAD);
|
||||
const char *lossage
|
||||
#ifdef USE___THREAD
|
||||
= TLS_INIT_TP (tcbp, USE___THREAD);
|
||||
#else
|
||||
= TLS_INIT_TP (tcbp, 0);
|
||||
#endif
|
||||
if (__builtin_expect (lossage != NULL, 0))
|
||||
_dl_fatal_printf ("cannot set up thread-local storage: %s\n", lossage);
|
||||
tls_init_tp_called = true;
|
||||
@@ -2310,7 +2315,12 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
|
||||
TLS we know the thread pointer was initialized earlier. */
|
||||
if (! tls_init_tp_called)
|
||||
{
|
||||
const char *lossage = TLS_INIT_TP (tcbp, USE___THREAD);
|
||||
const char *lossage
|
||||
#ifdef USE___THREAD
|
||||
= TLS_INIT_TP (tcbp, USE___THREAD);
|
||||
#else
|
||||
= TLS_INIT_TP (tcbp, 0);
|
||||
#endif
|
||||
if (__builtin_expect (lossage != NULL, 0))
|
||||
_dl_fatal_printf ("cannot set up thread-local storage: %s\n",
|
||||
lossage);
|
||||
|
||||
Reference in New Issue
Block a user