From 8fc8625139aa22576db162a6b6491b78a079ff0b Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 15 Nov 2016 23:49:07 +0000 Subject: [PATCH] libopenmpt: add upstream patch to fix build with gcc-6 Signed-off-by: Stephan Raue (cherry picked from commit 60560259bdc2b7883b76bb08b9af3c7fde12b169) --- .../libopenmpt/patches/libopenmpt-bug-769.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 packages/addons/depends/audio/libopenmpt/patches/libopenmpt-bug-769.patch diff --git a/packages/addons/depends/audio/libopenmpt/patches/libopenmpt-bug-769.patch b/packages/addons/depends/audio/libopenmpt/patches/libopenmpt-bug-769.patch new file mode 100644 index 0000000000..c8db0644d5 --- /dev/null +++ b/packages/addons/depends/audio/libopenmpt/patches/libopenmpt-bug-769.patch @@ -0,0 +1,14 @@ +Index: soundlib/tuning.cpp +=================================================================== +--- a/soundlib/tuning.cpp (revision 6294) ++++ b/soundlib/tuning.cpp (working copy) +@@ -375,7 +375,8 @@ + if(!IsOfType(TT_GROUPGEOMETRIC)) return 0; + + if(note >= 0) return note % GetGroupSize(); +- else return (GetGroupSize() - (abs(note) % GetGroupSize())) % GetGroupSize(); ++ // static_cast(note) because g++-6 template-disables std::abs overloads for 8bit and 16bit integer types via std::enable_if. ++ else return (GetGroupSize() - (std::abs(static_cast(note)) % GetGroupSize())) % GetGroupSize(); + } + +