summarylogtreecommitdiffstats
path: root/Fix-build-failure-on-gcc-6.patch
diff options
context:
space:
mode:
authorJohannes Dewender2017-01-29 16:39:58 +0100
committerJohannes Dewender2017-01-29 16:39:58 +0100
commit6d8cc19a92bf8e310d50fb349520e01b8eaf8313 (patch)
treea169ff596afd910bf4b84354042c609af19148fd /Fix-build-failure-on-gcc-6.patch
parent3880f7a91430fa9dde566a58a39684d5c5a09f31 (diff)
downloadaur-6d8cc19a92bf8e310d50fb349520e01b8eaf8313.tar.gz
add patch for GCC 6
Diffstat (limited to 'Fix-build-failure-on-gcc-6.patch')
-rw-r--r--Fix-build-failure-on-gcc-6.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/Fix-build-failure-on-gcc-6.patch b/Fix-build-failure-on-gcc-6.patch
new file mode 100644
index 000000000000..4b915697a896
--- /dev/null
+++ b/Fix-build-failure-on-gcc-6.patch
@@ -0,0 +1,33 @@
+From 632e87969c3a5562a5d4842b03613267ba6236b2 Mon Sep 17 00:00:00 2001
+From: Petter Reinholdtsen <pere@debian.org>
+Date: Sun, 17 Jul 2016 08:59:10 +0200
+Subject: [PATCH] Fix build failure on gcc 6
+
+Array initializers for a char array fail for constants > 128
+on platforms where char is signed. Cast to fix it.
+---
+ gzip.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gzip.cpp b/gzip.cpp
+index 2aeaad3..35ccf31 100644
+--- a/gzip.cpp
++++ b/gzip.cpp
+@@ -23,12 +23,12 @@ inline unsigned long calculateCrc32(const QByteArray &data)
+ QByteArray gzipCompress(const QByteArray &data)
+ {
+ const char header[10] = {
+- 0x1f, 0x8b, // ID1 + ID2
++ 0x1f, static_cast<char>(0x8b), // ID1 + ID2
+ 8, // Compression Method
+ 0, // Flags
+ 0, 0, 0, 0, // Modification Time
+ 2, // Extra Flags
+- 255, // Operating System
++ static_cast<char>(255), // Operating System
+ };
+
+ QByteArray compressedData = qCompress(data);
+--
+2.11.0
+