[OE-core] [PATCH] libnl: musl fixes

André Draszik git at andred.net
Fri Aug 12 07:42:31 UTC 2016


On Fri, 2016-08-12 at 00:28 -0700, Khem Raj wrote:
> On Fri, Aug 12, 2016 at 12:26 AM, André Draszik <git at andred.net> wrote:
> > 
> > On Thu, 2016-08-11 at 22:45 -0700, Khem Raj wrote:
> > > 
> > > > 
> > > > 
> > > > On Aug 11, 2016, at 7:06 AM, André Draszik <git at andred.net> wrote:
> > > > 
> > > > The libnl+musl combination has two issues at the moment:
> > > > a) a public header file #include's an incorrect file
> > > >   (sys/poll.h instead of poll.h), which causes warnings and
> > > >   potentially errors (-Werror) in a musl based system
> > > > b) musl only ever provides the XSI version of strerror_r()
> > > > 
> > > 
> > > yes so you can check for something like
> > > (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE
> > > use XSI version
> > > else use GNU version
> > 
> > Well, the feature test is supposed to be set by the user (libnl in this
> > case), and evaluated by the c library (musl). libnl explicitly sets
> > _GNU_SOURCE, i.e. it expects the glibc version.
> 
> I see. It is something which should atleast be brought up with
> upstream as an issue
> they may just say, we need GNU version but atleast we will know

It's actually quite a bad thing... There might be many users (you mentioned
perf) out there which all are silently breaking because of this missing
interface in musl. If you look at the patch, in the musl case the result was
effectively a printf of an *int* with a *string format* specifier...

Maybe it'd be worth to convince musl to implement it (uclibc does), or at
least to emit an #error?

I only noticed by coincidence...


Cheers,
Andre'




More information about the Openembedded-core mailing list