On 12/2/2021 11:24 PM, Sören Tempel wrote:
Hi,

Jeff Law <jeffreya...@gmail.com> wrote:
So what doesn't make sense here is how both stddef.h files get
included.  That's the core problem I think you need to resolve.
The libgo/sysinfo.c file includes stddef.h (for which the GCC version in
ginclude is used on my system) and stdlib.h which, on musl, causes an
include of /usr/include/bits/alltypes.h [1] which then defines size_t
and other types, which were already defined by GCC's stddef.h, again [2].

As such, both stddef.h files are actually not included, i.e. only the
GCC one is used. The alternative here would be to have libgo/sysinfo.c
include the stddef.h provide by the systemc libc but not sure if that is
intended here. I am personally not very familiar with the GCC codebase.

I can send you a pre-processed version of sysinfo.c if you want to
reproduce this yourself.
Thanks.  What was confusing was the original explanation indicated it was two different versions of stddef.h being included, when in fact it was stddef.h (from gcc) and stdlib.h (from musl) getting included that caused the problem.

I replaced the instance of stddef.h with stdlib.h in the original explanation and included that in the commit log when I pushed this fix to the trunk.

Thanks for your patience,
Jeff

Reply via email to