summaryrefslogtreecommitdiff
path: root/lang/luasql
diff options
context:
space:
mode:
authorSebastian Kemper <sebastian_ml@gmx.net>2018-06-25 20:56:36 +0200
committerKarl Palsson <karlp@etactica.com>2018-07-05 11:32:57 +0000
commitc9a9f6f98af2dc1d96dbccc770a30788f615b9ae (patch)
tree5f551c43103d1bb93f3fdb1f9db66b739ce28a85 /lang/luasql
parent4b9ec8dbae747706cdd8d68c3b3ee0b08d224880 (diff)
luasql: fix compile with mariadb-10.2.x
This is in anticipation of the mariadb upgrade to 10.2.x. luasql compile fails: In file included from src/ls_mysql.c:21:0: src/ls_mysql.c: In function 'luaopen_luasql_mysql': src/ls_mysql.c:605:25: error: expected ')' before 'MYSQL_SERVER_VERSION' lua_pushliteral (L, MYSQL_SERVER_VERSION); ^ src/ls_mysql.c:605:5: error: too few arguments to function 'lua_pushlstring' lua_pushliteral (L, MYSQL_SERVER_VERSION); ^ /home/equeiroz/src/openwrt-asus/staging_dir/target-mipsel_74kc_musl/usr/include/lua.h:175:16: note: declared here LUA_API void (lua_pushlstring) (lua_State *L, const char *s, size_t l); ^~~~~~~~~~~~~~~ To fix this cherry-pick upstream commit 6df3f672313f8dbca219199c8ec8d20c0247347f. Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Diffstat (limited to 'lang/luasql')
-rw-r--r--lang/luasql/Makefile2
-rw-r--r--lang/luasql/patches/01-mariadb-compat.patch20
2 files changed, 21 insertions, 1 deletions
diff --git a/lang/luasql/Makefile b/lang/luasql/Makefile
index 3f904f8c3..1a43fdbcb 100644
--- a/lang/luasql/Makefile
+++ b/lang/luasql/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luasql
PKG_VERSION:=2.3.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_MIRROR_HASH:=b6251065656bf3e066d90d492dd06eec2c2cc76ab4b94187ce3ed9620d41f741
diff --git a/lang/luasql/patches/01-mariadb-compat.patch b/lang/luasql/patches/01-mariadb-compat.patch
new file mode 100644
index 000000000..ceab7286d
--- /dev/null
+++ b/lang/luasql/patches/01-mariadb-compat.patch
@@ -0,0 +1,20 @@
+commit 6df3f672313f8dbca219199c8ec8d20c0247347f
+Author: Tomás Guisasola <tomasguisasola@gmail.com>
+Date: Mon Jul 31 09:41:49 2017 -0300
+
+ Add support for building with MariaDB (thanks to Florian Weimer).
+
+--- a/src/ls_mysql.c
++++ b/src/ls_mysql.c
+@@ -602,7 +602,11 @@ LUASQL_API int luaopen_luasql_mysql (lua
+ luaL_setfuncs(L, driver, 0);
+ luasql_set_info (L);
+ lua_pushliteral (L, "_MYSQLVERSION");
++#ifdef MARIADB_CLIENT_VERSION_STR
++ lua_pushliteral (L, MARIADB_CLIENT_VERSION_STR);
++#else
+ lua_pushliteral (L, MYSQL_SERVER_VERSION);
++#endif
+ lua_settable (L, -3);
+ return 1;
+ }