* sysinfo padding question
@ 2012-11-18 20:25 Justin Cormack
2012-11-18 20:46 ` Rich Felker
0 siblings, 1 reply; 2+ messages in thread
From: Justin Cormack @ 2012-11-18 20:25 UTC (permalink / raw)
To: musl
Why is the padding for sysinfo for the kernel different from the libc
one for Musl?
/usr/include/linux/kernel.h has char
_f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
/usr/include/sys/sysinfo.h has char __reserved[256];
glibc just includes the kernel header from sys/sysinfo.h so both these
structs are the same size there, so not sure I see any rationale.
Justin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: sysinfo padding question
2012-11-18 20:25 sysinfo padding question Justin Cormack
@ 2012-11-18 20:46 ` Rich Felker
0 siblings, 0 replies; 2+ messages in thread
From: Rich Felker @ 2012-11-18 20:46 UTC (permalink / raw)
To: musl
On Sun, Nov 18, 2012 at 08:25:48PM +0000, Justin Cormack wrote:
> Why is the padding for sysinfo for the kernel different from the libc
> one for Musl?
>
> /usr/include/linux/kernel.h has char
> _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */
> /usr/include/sys/sysinfo.h has char __reserved[256];
>
> glibc just includes the kernel header from sys/sysinfo.h so both these
> structs are the same size there, so not sure I see any rationale.
I don't think there was any particular rationale; I just did it to
make sure there's plenty of space for future expansion. Changing it to
match should be fine unless anybody objects. Note however that the
glibc definition gives no room to expand on 64-bit.
Rich
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-18 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-18 20:25 sysinfo padding question Justin Cormack
2012-11-18 20:46 ` Rich Felker
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).