Re: kernel headers ethtool.h and mii.h



On Wed, 2006-01-04 at 10:28 -0500, Robert Love wrote:
> ethtool.h and mii.h (included in the new nm-device-802-3-ethernet.c)
> define a bunch of structures with the kernel-internal u16, u32, etc.
> types.
> 
> This basically means they don't work without defining these types.
> 
> Kernel headers are not supposed to leak these types to user-space,
> polluting the name space, but instead use __u16, __u32, etc.
> 
> Dan, does Red Hat patch these files?  If <linux/ethtool.h> has __u32
> instead of u32, then you do.

Yes, it appears that we do.

> Patching these files is the right solution.  I sent the attached two
> patches upstream and they should go in the next kernel release.  Then,
> once glibc repopulates its headers from the kernel, everyone will be all
> right.  In the interim, distros can add these patches to their glibc
> packages, if they are not doing so already.

Yeah, saw those already on lkml.  Sounds good.

> As a temp hack, the attached patch against NM makes everything work by
> defining the new types.  Hacky, but it builds.

We have to do this for wpa.c too since somebody decided it was cool to
use kernel types in wpa_supplicant.  Whatever.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]