libbsd: add upstream patch to fix musl build issue
authorJörg Krause <joerg.krause@embedded.rocks>
Fri, 6 Apr 2018 08:18:35 +0000 (10:18 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 9 Apr 2018 09:25:17 +0000 (11:25 +0200)
commitcce98cbbb031c0e9960b9e98df413e87b15ca1ce
treeb4bbfbc1d5b740f005d96246f7ca7f9908f0dc2d
parentfc4b66dbc1b71e871129ce14b289fcda6eb3ea10
libbsd: add upstream patch to fix musl build issue

Commit d879be3049598f35d7b959784e1a6c2811ba2036 enabled the build for non-glibc
toolchains and added a  patch from upstream to fix one remaining build issue
with musl.

The upstream patch defines the glibc specific macro `__GLIBC_PREREQ` in
`include/bsd/sys/cdefs.h`, but the patch does not include this header
file in `include/bsd/stdlib.h` which uses the macro.

Upstream did committed an earlier patch which adds this header inclusion
to `include/bsd/stdlib.h`. So, add this upstream patch as well to fix a
build error when building the hcitop tool from the not yet added package
bluez-alsa.

Note, that the upstream patch address the issue that `<sys/cdefs.h>` is
a non-portable header. However, this is not the issue which needs to be
fixed by this patch, but solely the needed inclusion of the
`include/bsd/stdlib.h` header file, to see the definition of
`__GLIBC_PREREQ`.

Backported from: 11ec8f1e5dfa1c10e0c9fb94879b6f5b96ba52dd

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libbsd/0003-Handle-systems-missing-sys-cdefs.h.patch [new file with mode: 0644]