Sophie

Sophie

distrib > Mageia > 9 > aarch64 > by-pkgid > af22603ff8b9e06e9deab19a799d1d3d > files > 128

glibc-2.36-49.mga9.src.rpm

From 3edc4ff2ceff4a59587ebecb94148d3bcfa1df62 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 19 Jul 2023 14:09:26 -0700
Subject: [PATCH] =?UTF-8?q?make=20=E2=80=98struct=20pthread=E2=80=99=20a?=
 =?UTF-8?q?=20complete=20type?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* nptl/descr.h (struct pthread): Remove end_padding member, which
made this type incomplete.
(PTHREAD_STRUCT_END_PADDING): Stop using end_padding.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
---
 nptl/descr.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/nptl/descr.h b/nptl/descr.h
index 746a4b9e4ae5..d06abd6ad9ca 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -408,11 +408,11 @@ struct pthread
   /* rseq area registered with the kernel.  */
   struct rseq rseq_area;
 
-  /* This member must be last.  */
-  char end_padding[];
-
+  /* Amount of end padding, if any, in this structure.
+     This definition relies on rseq_area being last.  */
 #define PTHREAD_STRUCT_END_PADDING \
-  (sizeof (struct pthread) - offsetof (struct pthread, end_padding))
+  (sizeof (struct pthread) - offsetof (struct pthread, rseq_area) \
+   + sizeof (struct rseq))
 } __attribute ((aligned (TCB_ALIGNMENT)));
 
 static inline bool
-- 
2.41.0