[Bridge] [PATCH v2] libbridge: fix headers conflict with musl libc

Baruch Siach baruch at tkos.co.il
Tue Nov 1 19:16:31 UTC 2016


Hi Stephen,

On Tue, Nov 01, 2016 at 11:42:29AM -0600, Stephen Hemminger wrote:
> I understand that musl requires some changes, but copying data is not the
> correct way to handle this. Lots of work went into making Glibc and kernel
> headers compatiable. It looks like MUSL needs to follow the same agreement.

I surely don't get all the relevant details here. A recent discussion with the 
musl libc maintainer, Rich Felker, indicates that part of that compatibility 
work is glibc specific[1], since it depends on __GLIBC__ being defined. Denys 
Vlasenko proposed[2] a different solution. The entire thread is at [3].

[1] http://lists.landley.net/pipermail/aboriginal-landley.net/2015-October/002459.html 
[2] http://lists.landley.net/pipermail/aboriginal-landley.net/2015-October/002469.html 
[3] http://lists.landley.net/pipermail/aboriginal-landley.net/2015-October/thread.html

baruch

> On Sun, Oct 30, 2016 at 11:58 AM, Baruch Siach <baruch at tkos.co.il> wrote:
> > Don't including kernel headers directly to avoid headers conflict like:
> >
> > In file included from .../sysroot/usr/include/linux/if_bridge.h:18:0,
> >                  from libbridge.h:26,
> >                  from libbridge_if.c:26:
> > .../sysroot/usr/include/linux/in6.h:32:8: error: redefinition of ‘struct
> > in6_addr’
> >  struct in6_addr {
> >         ^
> > In file included from libbridge.h:24:0,
> >                  from libbridge_if.c:26:
> > .../sysroot/usr/include/netinet/in.h:23:8: note: originally defined here
> >  struct in6_addr {
> >         ^
> >
> > Instead copy the required linux/if_bridge.h definitions into
> > libbridge_private.h.
> >
> > Signed-off-by: Baruch Siach <baruch at tkos.co.il>

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -


More information about the Bridge mailing list