about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/i386/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/sysdeps/i386/tls.h')
-rw-r--r--linuxthreads/sysdeps/i386/tls.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/linuxthreads/sysdeps/i386/tls.h b/linuxthreads/sysdeps/i386/tls.h
index 569a897474..84d87db359 100644
--- a/linuxthreads/sysdeps/i386/tls.h
+++ b/linuxthreads/sysdeps/i386/tls.h
@@ -81,7 +81,14 @@ typedef struct
 #  define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
 
 /* This is the size of the TCB.  */
-#  define TLS_TCB_SIZE sizeof (struct _pthread_descr_struct)
+#  ifndef IS_IN_rtld
+#   define TLS_TCB_SIZE sizeof (struct _pthread_descr_struct)
+#  else
+#   include <nptl-struct-pthread.h>
+#   define TLS_TCB_SIZE \
+  (sizeof (struct _pthread_descr_struct) > NPTL_STRUCT_PTHREAD_SIZE	\
+   ? sizeof (struct _pthread_descr_struct) : NPTL_STRUCT_PTHREAD_SIZE)
+#  endif
 
 /* Alignment requirements for the TCB.  */
 #  define TLS_TCB_ALIGN __alignof__ (struct _pthread_descr_struct)