From 2e667094372812b7e6e4af7cbfc5d22e6a4e6712 Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Sat, 17 Oct 2020 21:30:34 +0200 Subject: [PATCH] fix build with gcc 10 (from gentoo) --- musepack-tools-fno-common.patch | 16 ++++++++++++++++ musepack-tools.spec | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 musepack-tools-fno-common.patch diff --git a/musepack-tools-fno-common.patch b/musepack-tools-fno-common.patch new file mode 100644 index 0000000..0fb9f5e --- /dev/null +++ b/musepack-tools-fno-common.patch @@ -0,0 +1,16 @@ +https://bugs.gentoo.org/706992 +--- a/libmpcdec/requant.h ++++ b/libmpcdec/requant.h +@@ -47,9 +47,9 @@ + + + /* C O N S T A N T S */ +-const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer +-const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients +-const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset ++extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer ++extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients ++extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset + + #define Cc (__Cc + 1) + #define Dc (__Dc + 1) diff --git a/musepack-tools.spec b/musepack-tools.spec index 7ee60e7..190bdc7 100644 --- a/musepack-tools.spec +++ b/musepack-tools.spec @@ -14,6 +14,7 @@ Group: Libraries Source0: http://files.musepack.net/source/musepack_src_r%{rev}.tar.gz # Source0-md5: 754d67be67f713e54baf70fcfdb2817e Patch0: %{name}-libs.patch +Patch1: %{name}-fno-common.patch URL: http://www.musepack.net/ BuildRequires: cmake >= 2.4 BuildRequires: libcuefile-devel @@ -65,6 +66,7 @@ Statyczna wersja biblioteki Musepack SV8. %prep %setup -q -n musepack_src_r%{rev} %patch0 -p0 +%patch1 -p1 %{__rm} -r include/mpc/.svn -- 2.44.0