[Toybox] [PATCH 1/4] Implement hostname lookups in display_routes

Rich Felker dalias at libc.org
Tue Jun 2 11:48:04 PDT 2020

On Tue, Jun 02, 2020 at 12:42:41PM -0500, Rob Landley wrote:
> On 6/2/20 12:25 PM, Rich Felker wrote:
> > This likely needs a new __UAPI_* macro to suppress it. It's likely
> > that nobody has hit it because sys/sysinfo.h is a pretty obscure
> > header and it's usually not included anywhere except uptime(1), etc.
> > Having it in lib/portability.h, rather than just in the files that
> > need it, is probably not a good idea.
> It built fine with glibc, which is why it got committed unnoticed.

To clarify here, I was talking about why the kernel header clash went
unnotice for so long in the entire ecosysten, not in toybox. There's
never been a report of this before, and it's likely because there are
only 6 kernel headers which include the offending linux/kernel.h, and
none of them are things that would typically be included in the same
file using sysinfo(). This is among tens of thousands of packages.

That's not to say it's wrong to include both linux/netlink.h and
sys/sysinfo.h, just an explanation of how the bug survived so long.

> > I'm not sure how kernel folks will want to fix this, if at all. Once
> > we get an idea of that I can include a patch in mcm for the kernel
> > header that matches what upstream is doing.
> Again, builds fine with glibc. I commited a workaround for the musl bug.

I checked out your workaround and it should work fine at present and
for the forseeable future. I'd still like to get this fixed properly,
but that will be a discussion with kernel folks.


More information about the Toybox mailing list