]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2005-03-05 Jakub Jelinek <jakub@redhat.com>
authorRoland McGrath <roland@gnu.org>
Mon, 17 Oct 2005 04:53:27 +0000 (04:53 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 17 Oct 2005 04:53:27 +0000 (04:53 +0000)
[BZ #721]
* sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Rework for GCC 4.

linuxthreads/sysdeps/powerpc/tcb-offsets.sym

index b526b62336051b8a6359f1deffe9d0debe9520d4..7c5cca01ea45e91a8de02b3a10d9932d02f58a0b 100644 (file)
@@ -8,7 +8,7 @@
 -- Abuse tls.h macros to derive offsets relative to the thread register.
 #  undef __thread_register
 #  define __thread_register    ((void *) 0)
-#  define thread_offsetof(mem) ((void *) &THREAD_SELF->p_##mem - (void *) 0)
+#  define thread_offsetof(mem) ((ptrdiff_t) THREAD_SELF + offsetof (struct _pthread_descr_struct, p_##mem))
 
 # else