Package: linux-minidisc / 0.9.14-2

0002-fix-big-endian64-builds.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: Force remaining size value to be unsigned 32-bit
 Cherry-picked patch from upstream which fixes the build
 on big-endian 64-bit targets.
Author: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

--- linux-minidisc-0.9.14.orig/qhimdtransfer/wavefilewriter.cpp
+++ linux-minidisc-0.9.14/qhimdtransfer/wavefilewriter.cpp
@@ -126,7 +126,7 @@ updateU32LESizeField(QFile &file, size_t
     }
 
     // The "remaining" size is calculated from after the value (subtract offset + value size)
-    new_value = qToLittleEndian(new_value - (offset + sizeof(new_value)));
+    new_value = qToLittleEndian(uint32_t(new_value - (offset + sizeof(new_value))));
     if ((size_t)file.write((char *)&new_value, sizeof(new_value)) != sizeof(new_value)) {
         qWarning() << "Could not update field in file";
         return false;