0003-include-fpu-control-with-glibc-only.patch 1.0 KB

1234567891011121314151617181920212223242526
  1. Include <fpu_control.h> only on glibc systems
  2. The <fpu_control.h> header provides _FPU_*() macros, which the
  3. Init_FPU() function uses only on i386, and only when they are
  4. defined. Since <fpu_control.h> is not available, this causes a build
  5. failure with C libraries such as musl. By simply including
  6. <fpu_control.h> explicitly on glibc systems, we avoid the build
  7. failure, since mpcenc.c already conditionally uses the <fpu_control.h>
  8. macros only if they are defined.
  9. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  10. [Thomas: better commit log.]
  11. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  12. diff -uNr musepack_src_r475.org/mpcenc/mpcenc.h musepack_src_r475/mpcenc/mpcenc.h
  13. --- musepack_src_r475.org/mpcenc/mpcenc.h 2009-02-23 19:15:46.000000000 +0100
  14. +++ musepack_src_r475/mpcenc/mpcenc.h 2016-01-30 09:29:08.000000000 +0100
  15. @@ -50,7 +51,7 @@
  16. # include <unistd.h>
  17. #endif
  18. -#if defined __linux__
  19. +#if defined __GLIBC__
  20. # include <fpu_control.h>
  21. #elif defined __FreeBSD__
  22. # include <machine/floatingpoint.h>