summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2018-03-01 12:51:53 -0500
committerBrian Evans <grknight@gentoo.org>2018-03-01 12:51:53 -0500
commit1c3d12ccc75b97f990ba95de27d345566d6d5b08 (patch)
tree8933e2e6d23aea54a49a51ceb5185725960a98e0
parentapp-portage/hashgen: initial ebuild by me (diff)
downloadgentoo-1c3d12cc.tar.gz
gentoo-1c3d12cc.tar.bz2
gentoo-1c3d12cc.zip
dev-db/myodbc: Fix build of 5.3.10 with mariadb 10.{0,1}
Package-Manager: Portage-2.3.24, Repoman-2.3.6
-rw-r--r--dev-db/myodbc/files/5.3.10-mariadb.patch58
-rw-r--r--dev-db/myodbc/myodbc-5.3.10-r1.ebuild2
2 files changed, 59 insertions, 1 deletions
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 000000000000..c860349e4b71
--- /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 63881efa73e2..5aeb327fb5b1 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() {