On Mon, Mar 25, 2019 at 05:31:47PM +0100, Andrea Adami wrote:
> On Mon, Mar 25, 2019 at 5:10 PM Adrian Bunk <b...@stusta.de> wrote:
> >
> > On Mon, Mar 25, 2019 at 04:36:44PM +0100, Andrea Adami wrote:
> > > On Sat, Mar 23, 2019 at 11:00 PM Andreas Müller <schnitzelt...@gmail.com> 
> > > wrote:
> > > >
> > > > On Sat, Mar 23, 2019 at 10:53 PM Adrian Bunk <b...@stusta.de> wrote:
> > > > >
> > > > > On Sat, Mar 23, 2019 at 10:22:15PM +0100, Andreas Müller wrote:
> > > > > > On Sat, Mar 23, 2019 at 10:16 PM Adrian Bunk <b...@stusta.de> wrote:
> > > > > > >
> > > > > > > On Fri, Mar 22, 2019 at 03:18:01PM -0700, Khem Raj wrote:
> > > > > > > >...
> > > > > > > > There are certain design aspects of musl which are actually 
> > > > > > > > turning
> > > > > > > > out to be good
> > > > > > > > e.g. there is no __MUSL__ define, so non-portable code can not 
> > > > > > > > be
> > > > > > > > hidden which is a good thing,
> > > > > > > >...
> > > > > > >
> > > > > > > Please take a closer look at some of the musl changes to NM that 
> > > > > > > made
> > > > > > > upgrading NM so hard for Andreas.
> > > > > > >
> > > > > > > +#if defined(__GLIBC__)
> > > > > > >  #include <net/ethernet.h>
> > > > > > > +#else /* musl libc */
> > > > > > > +#define ETH_ALEN       6               /* Octets in one ethernet 
> > > > > > > addr   */
> > > > > > > +#endif
> > >...
> > >
> > > Hi,
> >
> > Hi Andrea,
> >
> > > I am jumping in a little late to take side with Khem :)
> > >
> > > What happens now is that more 'bad' sources (written to suit glibc and
> > > thus not portable) are discovered by the wider base of developers and
> > > autobuilders.
> > >...
> >
> > but this does not apply to this example, which is a problem between
> > musl itself and the kernel headers.
> >
> > Code can expect #include <foo.h> to work for any headers, and with any
> > order of these headers. If it does not, the 'bad' sources are whatever
> > sources provide the headers in question.
> >
> > musl does provide net/ethernet.h, but including it causes a compile
> > error here.
> 
> Adrian,
> 
> I don't know in this specific case, you do surely know better about
> kernel/headers than me :)
> Strangely I remember one issue with net/if.h and netinet/in.h with
> kexec-tools and musl: maybe there is really something too special with
> those net headers.
> 
> Switching the order of the headers did solve back then
> https://git.openembedded.org/meta-openembedded/commit/meta-initramfs/recipes-kernel/kexec?id=b97358d5a3568deb2a5e939019bb2acef053e53f

This changed the order between two headers that are both provided by musl.

> Sorry for the OT

This is not OT, this is a good example for a patch that is a workaround
for some problem in musl (and not a generic portability fix).

> Cheers
> Andrea

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to