app-text/fbreader: make gcc6 happy
authorAndrey Grozin <grozin@gentoo.org>
Thu, 1 Sep 2016 03:17:16 +0000 (10:17 +0700)
committerAndrey Grozin <grozin@gentoo.org>
Thu, 1 Sep 2016 03:17:16 +0000 (10:17 +0700)
Bug: 592588

Package-Manager: portage-2.3.0

app-text/fbreader/fbreader-0.99.4-r2.ebuild
app-text/fbreader/files/fbreader-0.99.4-gcc6.patch [new file with mode: 0644]

index 6d5c3102c10f68ce82f4d28544d9f847de6f0101..a05caff6483db744549c8f175e760d8991fe317e 100644 (file)
@@ -74,6 +74,8 @@ src_prepare() {
        epatch "${FILESDIR}"/${P}-mimetypes.patch
        # bug #437262
        epatch "${FILESDIR}"/${P}-ld-bfd.patch
+       # bug #592588
+       epatch "${FILESDIR}"/${P}-gcc6.patch
 }
 
 src_compile() {
diff --git a/app-text/fbreader/files/fbreader-0.99.4-gcc6.patch b/app-text/fbreader/files/fbreader-0.99.4-gcc6.patch
new file mode 100644 (file)
index 0000000..c6f87a2
--- /dev/null
@@ -0,0 +1,11 @@
+--- fbreader/src/formats/doc/OleStorage.cpp    2012-11-30 13:41:25.000000000 +0100
++++ fbreader/src/formats/doc/OleStorage.cpp-new        2016-08-31 17:23:18.232536401 +0200
+@@ -59,7 +59,7 @@
+               clear();
+               return false;
+       }
+-      static const char OLE_SIGN[] = {0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1, 0};
++      static const char OLE_SIGN[] = {(char)0xD0, (char)0xCF, (char)0x11, (char)0xE0, (char)0xA1, (char)0xB1, (char)0x1A, (char)0xE1, 0};
+       if (std::strncmp(oleBuf, OLE_SIGN, 8) != 0) {
+               clear();
+               return false;