From cba932a5a9e91cffd7f4172d7e91f9b2efb1f84b Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Tue, 12 Nov 2019 12:41:34 +0100
Subject: slotinfo in struct dtv_slotinfo_list should be flexible array [BZ
 #25097]

GCC 10 will warn about subscribing inner length zero arrays.  Use a GCC
extension in csu/libc-tls.c to allocate space for the static_slotinfo
variable.  Adjust nptl_db so that the type description machinery does
not attempt to determine the size of the flexible array member slotinfo.

Change-Id: I51be146a7857186a4ede0bb40b332509487bdde8
---
 nptl_db/structs.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'nptl_db/structs.def')

diff --git a/nptl_db/structs.def b/nptl_db/structs.def
index f834d1d..a3aa71a 100644
--- a/nptl_db/structs.def
+++ b/nptl_db/structs.def
@@ -110,7 +110,7 @@ DB_RTLD_GLOBAL_FIELD (dl_tls_dtv_slotinfo_list)
 DB_STRUCT (dtv_slotinfo_list)
 DB_STRUCT_FIELD (dtv_slotinfo_list, len)
 DB_STRUCT_FIELD (dtv_slotinfo_list, next)
-DB_STRUCT_ARRAY_FIELD (dtv_slotinfo_list, slotinfo)
+DB_STRUCT_FLEXIBLE_ARRAY (dtv_slotinfo_list, slotinfo)
 
 DB_STRUCT (dtv_slotinfo)
 DB_STRUCT_FIELD (dtv_slotinfo, gen)
-- 
cgit v1.1

