Date: Friday, May 26, 2017 @ 09:43:56
  Author: arojas
Revision: 230436

Fix build with GCC 7

Added:
  gambas3/trunk/gambas3-gcc7.patch
Modified:
  gambas3/trunk/PKGBUILD

--------------------+
 PKGBUILD           |    8 ++++++--
 gambas3-gcc7.patch |   11 +++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2017-05-26 09:42:41 UTC (rev 230435)
+++ PKGBUILD    2017-05-26 09:43:56 UTC (rev 230436)
@@ -31,9 +31,10 @@
         'gmime')
 options=('!emptydirs' 'libtool')
 source=("http://downloads.sourceforge.net/gambas/${pkgbase}-${pkgver}.tar.bz2";
-        'prefer-qt5.patch')
+        'prefer-qt5.patch' 'gambas3-gcc7.patch')
 md5sums=('e7775977ed25f944468904553d67b8f1'
-         '71131eb16bbdf27bf6d329f089602cf7')
+         '71131eb16bbdf27bf6d329f089602cf7'
+         '97c31d0589c1fe0c5d35af11038f8362')
 
 create_dirs() {
   install -dm755 ${pkgdir}/usr/lib/gambas3
@@ -43,6 +44,9 @@
 prepare() {
   cd ${srcdir}/${pkgbase}-${pkgver}
 
+  # Fix build with GCC 7
+  patch -p3 -i ../gambas3-gcc7.patch
+
   # Prefer Qt5 over Qt4 for the IDE (Qt4 will not work due to the QtWebkit 
removal)
   patch -Np1 -i ../prefer-qt5.patch
   ./reconf-all

Added: gambas3-gcc7.patch
===================================================================
--- gambas3-gcc7.patch                          (rev 0)
+++ gambas3-gcc7.patch  2017-05-26 09:43:56 UTC (rev 230436)
@@ -0,0 +1,11 @@
+--- a/gambas/trunk/gb.db.sqlite2/src/sqlitedataset.cpp
++++ b/gambas/trunk/gb.db.sqlite2/src/sqlitedataset.cpp
+@@ -765,7 +765,7 @@
+           _right = (char *)rindex(Type, ')');
+           _left = (char *)index(Type, '(');
+            if (_right){
+-              _right = '\0';
++              _right = NULL;
+                 rTypeLen = atoi(_left + 1);
+            }
+            else {

Reply via email to