diff --git a/multimedia/sound/audiofile/files/unsigned-gcc6.patch b/multimedia/sound/audiofile/files/unsigned-gcc6.patch new file mode 100644 index 0000000000..01baeb5e63 --- /dev/null +++ b/multimedia/sound/audiofile/files/unsigned-gcc6.patch @@ -0,0 +1,28 @@ +From 28cfdbbcb96a69087c3d21faf69b5eae7bcf6d69 Mon Sep 17 00:00:00 2001 +From: Hodorgasm +Date: Wed, 11 May 2016 21:42:07 -0400 +Subject: [PATCH] Cast to unsigned while left bit-shifting + +GCC-6 now treats the left bitwise-shift of a negative integer as nonconformant so explicitly cast to an unsigned int while bit-shifting. + +Downloaded from upstream PR: +https://github.com/mpruett/audiofile/pull/28 + +Signed-off-by: Bernd Kuhls +--- + libaudiofile/modules/SimpleModule.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libaudiofile/modules/SimpleModule.h b/libaudiofile/modules/SimpleModule.h +index 03c6c69..4014fb2 100644 +--- a/libaudiofile/modules/SimpleModule.h ++++ b/libaudiofile/modules/SimpleModule.h +@@ -123,7 +123,7 @@ struct signConverter + typedef typename IntTypes::UnsignedType UnsignedType; + + static const int kScaleBits = (Format + 1) * CHAR_BIT - 1; +- static const int kMinSignedValue = -1 << kScaleBits; ++ static const int kMinSignedValue = static_cast(static_cast(-1) << kScaleBits);; + + struct signedToUnsigned : public std::unary_function + { diff --git a/multimedia/sound/audiofile/pspec.xml b/multimedia/sound/audiofile/pspec.xml index b6fb221a2b..a2fed13d22 100644 --- a/multimedia/sound/audiofile/pspec.xml +++ b/multimedia/sound/audiofile/pspec.xml @@ -17,7 +17,10 @@ alsa-lib-devel flac-devel - + + + unsigned-gcc6.patch + @@ -25,6 +28,7 @@ alsa-lib flac + libgcc /usr/bin @@ -57,7 +61,6 @@ alsa-lib-32bit flac-32bit - alsa-lib-32bit @@ -92,4 +95,4 @@ kaptan@pisilinux.org - + \ No newline at end of file