From: Szabolcs Nagy Date: Mon, 26 Jul 2021 19:31:38 +0000 (-0300) Subject: libio: adjust _IO_FILE / _IO_FILE_complete for 128 bit pointers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8335dc69af32d65c95cf551d950aafb1254d9ce;p=thirdparty%2Fglibc.git 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. --- diff --git a/libio/bits/types/struct_FILE.h b/libio/bits/types/struct_FILE.h index 1eb429888c4..f73d051c0e1 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. */