summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hill <rhill@gentoo.org>2015-10-01 19:41:14 -0600
committerRyan Hill <rhill@gentoo.org>2015-10-01 19:41:14 -0600
commit49ba2f7bae64d3a75f414c682f9703626a6fd9e7 (patch)
tree0677d89c641c814bdc935645e727056d985609b9 /media-sound/mumble
parentmedia-libs/mesa: Use upstream --enable-glx-read-only-text. (diff)
downloadgentoo-49ba2f7bae64d3a75f414c682f9703626a6fd9e7.tar.gz
gentoo-49ba2f7bae64d3a75f414c682f9703626a6fd9e7.tar.bz2
gentoo-49ba2f7bae64d3a75f414c682f9703626a6fd9e7.zip
media-sound/mumble: Fix build with GCC 4.9.
Gentoo-Bug: https://bugs.gentoo.org/532180 Package-Manager: portage-2.2.22 Signed-off-by: Ryan Hill <rhill@gentoo.org>
Diffstat (limited to 'media-sound/mumble')
-rw-r--r--media-sound/mumble/files/mumble-1.2.8-gcc49.patch26
-rw-r--r--media-sound/mumble/mumble-1.2.8.ebuild3
2 files changed, 28 insertions, 1 deletions
diff --git a/media-sound/mumble/files/mumble-1.2.8-gcc49.patch b/media-sound/mumble/files/mumble-1.2.8-gcc49.patch
new file mode 100644
index 000000000000..cecb3d3fab84
--- /dev/null
+++ b/media-sound/mumble/files/mumble-1.2.8-gcc49.patch
@@ -0,0 +1,26 @@
+https://bugs.gentoo.org/532180
+
+Avoid "jump to label crosses initialization" error.
+
+ Move variable "buffer" into the while loop to avoid a compile error
+ with g++ 4.9.0.
+
+ Although earlier compiler versions did accept the code, jumping into the
+ scope of an variable length array is not allowed:
+ http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Variable-Length.html
+
+
+--- a/src/mumble/OSS.cpp
++++ b/src/mumble/OSS.cpp
+@@ -243,9 +243,9 @@ void OSSInput::run() {
+ eMicFormat = SampleShort;
+ initializeMixer();
+
+- short buffer[iMicLength];
+-
+ while (bRunning) {
++ short buffer[iMicLength];
++
+ int len = static_cast<int>(iMicLength * iMicChannels * sizeof(short));
+ ssize_t l = read(fd, buffer, len);
+ if (l != len) {
diff --git a/media-sound/mumble/mumble-1.2.8.ebuild b/media-sound/mumble/mumble-1.2.8.ebuild
index e457a05d5cca..a0282bf6efa2 100644
--- a/media-sound/mumble/mumble-1.2.8.ebuild
+++ b/media-sound/mumble/mumble-1.2.8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -47,6 +47,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-1.2.4-speech-dispatcher.patch
+ "${FILESDIR}"/${PN}-1.2.8-gcc49.patch
)
S="${WORKDIR}/${MY_P}"