package/libselinux: fix build with musl
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 26 Jul 2015 19:03:16 +0000 (21:03 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 27 Jul 2015 21:52:51 +0000 (23:52 +0200)
commitcac3cf8f9c36140eb0f5cd76665c1fdb0b47676c
treee8f81f8c594579af45eedea7d6a4964b9a376359
parent37dde2d31348ca35c816109f529a57bfc24bec26
package/libselinux: fix build with musl

musl does not define glibcisms, so we are missing some macros.

Define what we need in case the macro is missing. We're using a dumb
implementation, which is rather slow, to avoid copying from glibc, to
avoid propagating the LGPL to libselinux, which is Public Domain.

Fixes a bunch of autobuild failures:
    http://autobuild.buildroot.org/results/d4d/d4d209719d1ce5219f84719ad72fcb6a0c684007/
    http://autobuild.buildroot.org/results/1a6/1a65cc3d2c23a3c17c605788be62dbd18cbdaf76/
    http://autobuild.buildroot.org/results/0d0/0d0e4713833182d0f634b9b39b2c56f2bc0adcac/
    ...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Clayton Shotwell <clshotwe@rockwellcollins.com>
Reviewed-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libselinux/0002-fix-musl-build.patch [new file with mode: 0644]