aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-sql/luasql-mariadb.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/lua-sql/luasql-mariadb.patch')
-rw-r--r--main/lua-sql/luasql-mariadb.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/lua-sql/luasql-mariadb.patch b/main/lua-sql/luasql-mariadb.patch
new file mode 100644
index 0000000000..4237f6f94c
--- /dev/null
+++ b/main/lua-sql/luasql-mariadb.patch
@@ -0,0 +1,28 @@
+From 6df3f672313f8dbca219199c8ec8d20c0247347f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1s=20Guisasola?= <tomasguisasola@gmail.com>
+Date: Mon, 31 Jul 2017 09:41:49 -0300
+Subject: [PATCH] Add support for building with MariaDB (thanks to Florian
+ Weimer).
+
+---
+ src/ls_mysql.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/ls_mysql.c b/src/ls_mysql.c
+index f80fae4..843153b 100644
+--- a/src/ls_mysql.c
++++ b/src/ls_mysql.c
+@@ -603,7 +603,12 @@ LUASQL_API int luaopen_luasql_mysql (lua_State *L) {
+ luaL_setfuncs(L, driver, 0);
+ luasql_set_info (L);
+ lua_pushliteral (L, "_CLIENTVERSION");
+- lua_pushliteral (L, MYSQL_SERVER_VERSION);
++#ifdef MARIADB_CLIENT_VERSION_STR
++lua_pushliteral (L, MARIADB_CLIENT_VERSION_STR);
++#else
++lua_pushliteral (L, MYSQL_SERVER_VERSION);
++#endif
++ /*lua_pushliteral (L, MYSQL_SERVER_VERSION);*/
+ lua_settable (L, -3);
+ return 1;
+ }