diff options
Diffstat (limited to 'nptl_db/td_thr_tlsbase.c')
-rw-r--r-- | nptl_db/td_thr_tlsbase.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nptl_db/td_thr_tlsbase.c b/nptl_db/td_thr_tlsbase.c index 9f98bd9aed..06b9a9a7c7 100644 --- a/nptl_db/td_thr_tlsbase.c +++ b/nptl_db/td_thr_tlsbase.c @@ -42,8 +42,13 @@ td_thr_tlsbase (const td_thrhandle_t *th, attempted too early. Tough. */ td_thrhandle_t main_th; +#ifndef PTHREAD_T_IS_TID err = __td_ta_lookup_th_unique (th->th_ta_p, ps_getpid (th->th_ta_p->ph), &main_th); +#else + err = __td_ta_lookup_th_unique (th->th_ta_p, FIRST_THREAD_TID, + &main_th); +#endif if (err == 0) pd = main_th.th_unique; if (pd == 0) |