package/musl-compat-headers: provide compatibility headers not in musl

musl provides neither sys/queue.h nor sys/cdefs.h. Those two headers are
however quite widely used in a lot of packages (though they should at
least not use cdefs.h which is only full of mostly-legacy macros, and
which is mostly an internal header of glibc and was never really meant to
be exposed to, and used by packages).

But we don't live in an ideal world, so a lot of packages break when
those two headers are missing.

We already took care of sys/queue.h with the netbsd-queue package. But
the need for cdefs.h is getting more and more pressing.

We rename the netbsd-queue package into musl-compat-headers, and we
make it install sys/queue.h (from NetBSD) and sys/cdefs.h (a minimalist
one we bundle in Buildroot). We can't use the cdefs.h from NetBSD
because it includes machine-dependent headers; instead we bundle a very
minimalistic one, that covers only what we need.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Yann E. MORIN
2016-08-18 23:50:13 +02:00
committed by Thomas Petazzoni
parent f55adea434
commit e31eb72040
11 changed files with 104 additions and 37 deletions

View File

@@ -727,7 +727,8 @@ config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
config BR2_TOOLCHAIN_EXTERNAL_MUSL
bool
select BR2_TOOLCHAIN_USES_MUSL
select BR2_PACKAGE_NETBSD_QUEUE
# Compatibility headers: cdefs.h, queue.h
select BR2_PACKAGE_MUSL_COMPAT_HEADERS
if BR2_TOOLCHAIN_EXTERNAL_CUSTOM