From 5f3aed3f50ff48c8a60185407d7220aeedfea5e5 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sat, 30 Jan 2016 09:31:40 +0100 Subject: [PATCH] package/musepack: fix musl build This commit adds two patches needed to fix musl related build issues in musepack: a missing inclusion, and an inclusion of that should be made conditional on __GLIBC__. Fixes: http://autobuild.buildroot.net/results/6eb/6ebc9cbee3fc48f4f5b658d11b040ad62fb6607f/ Signed-off-by: Bernd Kuhls [Thomas: split the patch in two patches, add proper patch description.] Signed-off-by: Thomas Petazzoni --- ...-include-fpu-control-with-glibc-only.patch | 26 +++++++++++++++++++ .../musepack/0004-missing-sys-select.patch | 21 +++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 package/musepack/0003-include-fpu-control-with-glibc-only.patch create mode 100644 package/musepack/0004-missing-sys-select.patch diff --git a/package/musepack/0003-include-fpu-control-with-glibc-only.patch b/package/musepack/0003-include-fpu-control-with-glibc-only.patch new file mode 100644 index 0000000000..6f50155781 --- /dev/null +++ b/package/musepack/0003-include-fpu-control-with-glibc-only.patch @@ -0,0 +1,26 @@ +Include only on glibc systems + +The header provides _FPU_*() macros, which the +Init_FPU() function uses only on i386, and only when they are +defined. Since is not available, this causes a build +failure with C libraries such as musl. By simply including + explicitly on glibc systems, we avoid the build +failure, since mpcenc.c already conditionally uses the +macros only if they are defined. + +Signed-off-by: Bernd Kuhls +[Thomas: better commit log.] +Signed-off-by: Thomas Petazzoni + +diff -uNr musepack_src_r475.org/mpcenc/mpcenc.h musepack_src_r475/mpcenc/mpcenc.h +--- musepack_src_r475.org/mpcenc/mpcenc.h 2009-02-23 19:15:46.000000000 +0100 ++++ musepack_src_r475/mpcenc/mpcenc.h 2016-01-30 09:29:08.000000000 +0100 +@@ -50,7 +51,7 @@ + # include + #endif + +-#if defined __linux__ ++#if defined __GLIBC__ + # include + #elif defined __FreeBSD__ + # include diff --git a/package/musepack/0004-missing-sys-select.patch b/package/musepack/0004-missing-sys-select.patch new file mode 100644 index 0000000000..1e3a4b1140 --- /dev/null +++ b/package/musepack/0004-missing-sys-select.patch @@ -0,0 +1,21 @@ +Add missing include + +This header is needed when types like fd_set are used. This fixes a +build issue occuring on the musl C library. + +Signed-off-by: Bernd Kuhls +[Thomas: better commit log.] +Signed-off-by: Thomas Petazzoni + +Index: b/mpcenc/mpcenc.h +=================================================================== +--- a/mpcenc/mpcenc.h ++++ b/mpcenc/mpcenc.h +@@ -34,6 +34,7 @@ + //// portable system includes ////////////////////////////////////// + #include + #include ++#include + + //// system dependent system includes ////////////////////////////// + // low level I/O, where are prototypes and constants? -- 2.30.2