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

André Draszik git at andred.net
Fri Aug 12 07:26:50 UTC 2016


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.
Given musl doesn't provide the glibc version, and apart from implementing
the other version in musl, I don't see any viable alternative other than
what I posted.
One could #undefine _GNU_SOURCE and #define POSIX_C_SOURCE as appropriate
during compilation of the affected files, but that might have other side-
effects, and would be a major deviation from upstream...


Cheers,
Andre'




More information about the Openembedded-core mailing list