about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2021-07-26 16:31:38 -0300
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-11-22 14:31:25 +0000
commit8d04c0e9e94144c762b74beacad95b51fd7522cd (patch)
tree7cf4d2fb7d11c9184339bc545743425594abda20
parentad946943cede829e0af07b5e2dd39edbedceebba (diff)
downloadglibc-8d04c0e9e94144c762b74beacad95b51fd7522cd.tar.gz
glibc-8d04c0e9e94144c762b74beacad95b51fd7522cd.tar.xz
glibc-8d04c0e9e94144c762b74beacad95b51fd7522cd.zip
libio: adjust _IO_FILE / _IO_FILE_complete for 128 bit pointers
The size of the reserved space has to be adjusted because it underflows
with 16 byte pointers.  With the new value there should be enough space
for 2 more pointers in the struct on CHERI targets.
-rw-r--r--libio/bits/types/struct_FILE.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libio/bits/types/struct_FILE.h b/libio/bits/types/struct_FILE.h
index 1eb429888c..f73d051c0e 100644
--- a/libio/bits/types/struct_FILE.h
+++ b/libio/bits/types/struct_FILE.h
@@ -95,7 +95,9 @@ struct _IO_FILE_complete
   size_t __pad5;
   int _mode;
   /* Make sure we don't get into trouble again.  */
-  char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
+  char _unused2[sizeof (void *) == 4 * sizeof (int)
+		? 9 * sizeof (int)
+		: 15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
 };
 
 /* These macros are used by bits/stdio.h and internal headers.  */