Re: [musl] [PATCH 1/1] linux/sysinfo.h: Add guarder for struct sysinfo

From: Petr Vorel
Date: Thu Oct 01 2020 - 01:47:47 EST


Hi Rich,

...
> I don't think this is the right way to do it. It prevents getting
> access to the kernel uapi structure (which may be wanted) if you're
> not using glibc or if you include kernel headers before any libc
> headers. Rather, <linux/kernel.h>, whose only real purpose is
> providing this structure to legacy applications that don't know the
> renamed name for it, should not be implicitly included by other
> headers. There's an existing thread on the topic but I don't have the
> link handy. IIRC I proposed moving the alignment macros or whatever
> other useful stuff is in <linux/kernel.h> to a separate header and
> getting rid of all the indirect inclusions of <linux/kernel.h>.

Thanks for a review and tip!

Kind regards,
Petr