aboutsummaryrefslogtreecommitdiff
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-10-27 14:46:48 +0100
commitcea2af3fd58088fb3d374f9817ff7c9f31e4cb29 (patch)
treed953704c74934037622999d612bda30e37eb9afb
parent1604aadbdf88b72dd69183f69fa022f3d90ac20b (diff)
downloadglibc-cea2af3fd58088fb3d374f9817ff7c9f31e4cb29.tar
glibc-cea2af3fd58088fb3d374f9817ff7c9f31e4cb29.tar.gz
glibc-cea2af3fd58088fb3d374f9817ff7c9f31e4cb29.tar.bz2
glibc-cea2af3fd58088fb3d374f9817ff7c9f31e4cb29.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. */