[packages/mysql-workbench] - fix building on non 64bit archs

baggins baggins at pld-linux.org
Thu Mar 8 15:49:21 CET 2018


commit 59a6ced03fd7fc94177882d9455bf68cc816ad64
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Mar 8 14:49:01 2018 +0000

    - fix building on non 64bit archs

 format-string.patch  | 26 ++++++++++++++++++++++++++
 mysql-workbench.spec |  4 ++++
 types.patch          | 15 +++++++++++++++
 3 files changed, 45 insertions(+)
---
diff --git a/mysql-workbench.spec b/mysql-workbench.spec
index 5d59b93..2fe0121 100644
--- a/mysql-workbench.spec
+++ b/mysql-workbench.spec
@@ -30,6 +30,8 @@ Patch3:		wrapper-exec.patch
 Patch4:		antlr-res.patch
 Patch5:		mysql-version.patch
 Patch6:		ldconfig.patch
+Patch7:		format-string.patch
+Patch8:		types.patch
 URL:		http://wb.mysql.com/
 BuildRequires:	OpenGL-devel
 BuildRequires:	autoconf
@@ -108,6 +110,8 @@ skomplikowanych migracji do MySQL-a.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
+%patch8 -p1
 cp -p '%{SOURCE2}' res/mysql.profiles
 
 %if %{with system_antlr}
diff --git a/format-string.patch b/format-string.patch
new file mode 100644
index 0000000..c73b9ac
--- /dev/null
+++ b/format-string.patch
@@ -0,0 +1,26 @@
+--- mysql-workbench-community-6.3.10-src/library/base/jsonparser.cpp~	2017-11-09 16:11:42.000000000 +0000
++++ mysql-workbench-community-6.3.10-src/library/base/jsonparser.cpp	2018-03-08 13:43:48.632064990 +0000
+@@ -343,7 +343,11 @@
+    */
+   JsonValue &JsonArray::at(SizeType pos) {
+     if (pos > _data.size())
++#ifdef __x86_64__
+       throw std::out_of_range(base::strfmt("Index '%lu' is out of range.", pos));
++#else
++      throw std::out_of_range(base::strfmt("Index '%u' is out of range.", pos));
++#endif
+     return _data.at(pos);
+   }
+ 
+@@ -358,7 +362,11 @@
+    */
+   const JsonValue &JsonArray::at(SizeType pos) const {
+     if (pos > _data.size())
++#ifdef __x86_64__
+       throw std::out_of_range(base::strfmt("Index '%lu' is out of range.", pos));
++#else
++      throw std::out_of_range(base::strfmt("Index '%u' is out of range.", pos));
++#endif
+     return _data.at(pos);
+   }
+ 
diff --git a/types.patch b/types.patch
new file mode 100644
index 0000000..90dc2ad
--- /dev/null
+++ b/types.patch
@@ -0,0 +1,15 @@
+--- mysql-workbench-community-6.3.10-src/library/base/jsonparser.cpp~	2017-11-09 16:11:42.000000000 +0000
++++ mysql-workbench-community-6.3.10-src/library/base/jsonparser.cpp	2018-03-08 13:43:48.632064990 +0000
+@@ -1677,10 +1677,10 @@
+         _output += std::to_string((double)value);
+         break;
+       case VInt64:
+-        _output += std::to_string((int64_t)value);
++        _output += std::to_string((ssize_t)value);
+         break;
+       case VUint64:
+-        _output += std::to_string((uint64_t)value);
++        _output += std::to_string((size_t)value);
+         break;
+       case VObject:
+         write((JsonObject)value);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mysql-workbench.git/commitdiff/59a6ced03fd7fc94177882d9455bf68cc816ad64



More information about the pld-cvs-commit mailing list