summaryrefslogtreecommitdiff
path: root/nptl/descr.h
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/descr.h')
-rw-r--r--nptl/descr.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/nptl/descr.h b/nptl/descr.h
index d5491c1355..80251b920b 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -305,12 +305,11 @@ struct pthread
/* Resolver state. */
struct __res_state res;
- /* If you add fields after the res field above, please adjust
- the following macro. */
-#define PTHREAD_STRUCT_END_PADDING \
- (sizeof (struct pthread) - offsetof (struct pthread, res) \
- - sizeof (((struct pthread *) 0)->res))
+ /* This member must be last. */
+ char end_padding[];
+#define PTHREAD_STRUCT_END_PADDING \
+ (sizeof (struct pthread) - offsetof (struct pthread, end_padding))
} __attribute ((aligned (TCB_ALIGNMENT)));