You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-sound/mumble/files/mumble-1.2.8-gcc49.patch

27 lines
722 B

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) {