From de1a3af90edcf9eb047740e55361125a4e6ee2c8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 7 Aug 2024 17:33:54 +0200 Subject: [PATCH] main/lua-sql: fix build with gcc14 --- main/lua-sql/APKBUILD | 6 ++++-- main/lua-sql/gcc14.patch | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 main/lua-sql/gcc14.patch diff --git a/main/lua-sql/APKBUILD b/main/lua-sql/APKBUILD index 9822cae001f..903471bc7a0 100644 --- a/main/lua-sql/APKBUILD +++ b/main/lua-sql/APKBUILD @@ -6,7 +6,7 @@ _drivers="mysql postgres sqlite3 odbc" pkgname=lua-sql _pkgname=luasql pkgver=2.6.0 -pkgrel=4 +pkgrel=5 pkgdesc="Lua SQL drivers" url="http://lunarmodules.github.io/luasql/" arch="all" @@ -22,7 +22,8 @@ for _d in $_drivers; do subpackages="$subpackages lua-sql-$_d:_meta_subpackage" done -source="$_pkgname-$pkgver.tar.gz::https://github.com/lunarmodules/$_pkgname/archive/$pkgver.tar.gz" +source="$_pkgname-$pkgver.tar.gz::https://github.com/lunarmodules/$_pkgname/archive/$pkgver.tar.gz + gcc14.patch" builddir="$srcdir/$_pkgname-$pkgver" options="!check" @@ -87,4 +88,5 @@ _subpackage() { sha512sums=" 051438d4f5a9059c2ecf52143a06279469c220117b8b99363ea4fda434f08780794f0c4d54185ea891845238b3f5a307ba06ee7a1e7f4583a3b393c63eed66e9 luasql-2.6.0.tar.gz +59b3fc557db504fb2479fc68134bc0fd478ff3ad46f047c0f3429d66fa9b87e045af1331bade96accd895a61f88f5158b5db4b6783147009a9c6445ed4d85e0f gcc14.patch " diff --git a/main/lua-sql/gcc14.patch b/main/lua-sql/gcc14.patch new file mode 100644 index 00000000000..86ea7341c52 --- /dev/null +++ b/main/lua-sql/gcc14.patch @@ -0,0 +1,31 @@ +diff --git a/src/ls_odbc.c b/src/ls_odbc.c +index 5d44105..57b39d7 100644 +--- a/src/ls_odbc.c ++++ b/src/ls_odbc.c +@@ -36,7 +36,7 @@ + typedef struct { + SQLPOINTER buf; + SQLINTEGER len; +- SQLINTEGER type; ++ SQLLEN type; + } param_data; + + /* general form of the driver objects */ +@@ -685,7 +685,7 @@ static int raw_execute(lua_State *L, int istmt) + return create_cursor(L, -1, stmt, numcols); + } else { + /* if action has no results (e.g., UPDATE) */ +- SQLINTEGER numrows; ++ SQLLEN numrows; + if(error(SQLRowCount(stmt->hstmt, &numrows))) { + return fail(L, hSTMT, stmt->hstmt); + } +@@ -697,7 +697,7 @@ static int raw_execute(lua_State *L, int istmt) + + static int set_param(lua_State *L, stmt_data *stmt, int i, param_data *data) + { +- static SQLINTEGER cbNull = SQL_NULL_DATA; ++ static SQLLEN cbNull = SQL_NULL_DATA; + + switch(lua_type(L, -1)) { + case LUA_TNIL: {