commit:     1c3d12ccc75b97f990ba95de27d345566d6d5b08
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  1 17:51:53 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Thu Mar  1 17:51:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c3d12cc

dev-db/myodbc: Fix build of 5.3.10 with mariadb 10.{0,1}

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-db/myodbc/files/5.3.10-mariadb.patch | 58 ++++++++++++++++++++++++++++++++
 dev-db/myodbc/myodbc-5.3.10-r1.ebuild    |  2 +-
 2 files changed, 59 insertions(+), 1 deletion(-)

diff --git a/dev-db/myodbc/files/5.3.10-mariadb.patch 
b/dev-db/myodbc/files/5.3.10-mariadb.patch
new file mode 100644
index 00000000000..c860349e4b7
--- /dev/null
+++ b/dev-db/myodbc/files/5.3.10-mariadb.patch
@@ -0,0 +1,58 @@
+--- a/include/sys_main.h       2018-01-19 05:36:38.000000000 -0500
++++ b/include/sys_main.h       2018-03-01 11:40:04.554713079 -0500
+@@ -20,6 +20,8 @@
+ extern "C" {
+ #endif
+ 
++#include "sys/mysql/psi/psi_memory.h"
++
+ #define MY_FAE                8       /* Fatal if any error */
+ #define MY_WME                16      /* Write message on error */
+ #define MY_ZEROFILL   32      /* my_malloc(), fill array with zero */
+--- a/driver/connect.c 2018-01-19 05:36:38.000000000 -0500
++++ b/driver/connect.c 2018-03-01 11:39:51.458676373 -0500
+@@ -179,7 +179,7 @@
+   /* Set other connection options */
+ 
+   if (ds->allow_big_results || ds->safe)
+-#if MYSQL_VERSION_ID >= 50709
++#if MYSQL_VERSION_ID >= 50709 && !defined(MARIADB_BASE_VERSION)
+     mysql_options(mysql, MYSQL_OPT_MAX_ALLOWED_PACKET, &max_long);
+ #else
+     /* max_allowed_packet is a magical mysql macro. */
+@@ -252,7 +252,7 @@
+                   ds_get_utf8attr(ds->rsakey, &ds->rsakey8));
+   }
+ #endif
+-#if MYSQL_VERSION_ID >= 50710
++#if MYSQL_VERSION_ID >= 50710 && !defined(MARIADB_BASE_VERSION)
+   {
+     char tls_options[128] = { 0 };
+     if (!ds->no_tls_1)
+@@ -323,7 +323,7 @@
+ #endif
+ 
+   mysql->options.use_ssl = !ds->disable_ssl_default;
+-#if MYSQL_VERSION_ID >= 50703
++#if MYSQL_VERSION_ID >= 50703 && !defined(MARIADB_BASE_VERSION)
+   {
+     if (ds->ssl_enforce)
+     {
+@@ -332,7 +332,7 @@
+   }
+ #endif
+ 
+-#if MYSQL_VERSION_ID >= 50711
++#if MYSQL_VERSION_ID >= 50711 && !defined(MARIADB_BASE_VERSION)
+   if (ds->sslmode)
+   {
+     unsigned int mode = 0;
+@@ -510,7 +510,7 @@
+     }
+   }
+ 
+-#if MYSQL_VERSION_ID >= 50709
++#if MYSQL_VERSION_ID >= 50709 && !defined(MARIADB_BASE_VERSION)
+   mysql_get_option(mysql, MYSQL_OPT_NET_BUFFER_LENGTH, &dbc->net_buffer_len);
+ #else
+   // for older versions just use net_buffer_length() macro

diff --git a/dev-db/myodbc/myodbc-5.3.10-r1.ebuild 
b/dev-db/myodbc/myodbc-5.3.10-r1.ebuild
index 63881efa73e..5aeb327fb5b 100644
--- a/dev-db/myodbc/myodbc-5.3.10-r1.ebuild
+++ b/dev-db/myodbc/myodbc-5.3.10-r1.ebuild
@@ -43,7 +43,7 @@ PATCHES=(
        "${FILESDIR}/5.3.10-cxxlinkage.patch"
 #      "${FILESDIR}/${MAJOR}-mariadb-dynamic-array.patch"
        "${FILESDIR}/5.2.7-my_malloc.patch"
-#      "${FILESDIR}/${MAJOR}-mariadb-buffer_length.patch"
+       "${FILESDIR}/5.3.10-mariadb.patch"
 )
 
 src_prepare() {

Reply via email to