From c366711f7a54537b83c49a1ce3951fd3858ffd1b Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 28 Nov 2014 00:19:16 +0000 Subject: main/lua-sql: Add sqlite patch, bump pkgrel Add patch to make sqlite pragmas work https://github.com/keplerproject/luasql/pull/8/files --- main/lua-sql/sqlite_v2_api.patch | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 main/lua-sql/sqlite_v2_api.patch (limited to 'main/lua-sql/sqlite_v2_api.patch') diff --git a/main/lua-sql/sqlite_v2_api.patch b/main/lua-sql/sqlite_v2_api.patch new file mode 100644 index 0000000000..498c699e27 --- /dev/null +++ b/main/lua-sql/sqlite_v2_api.patch @@ -0,0 +1,26 @@ +--- a/src/ls_sqlite3.c ++++ b/src/ls_sqlite3.c +@@ -382,7 +382,11 @@ static int conn_execute(lua_State *L) + int numcols; + const char *tail; + ++#if SQLITE_VERSION_NUMBER > 3006013 ++ res = sqlite3_prepare_v2(conn->sql_conn, statement, -1, &vm, &tail); ++#else + res = sqlite3_prepare(conn->sql_conn, statement, -1, &vm, &tail); ++#endif + if (res != SQLITE_OK) + { + errmsg = sqlite3_errmsg(conn->sql_conn); + @@ -544,7 +548,11 @@ static int env_connect(lua_State *L) + + sourcename = luaL_checkstring(L, 2); + ++#if SQLITE_VERSION_NUMBER > 3006013 ++ res = sqlite3_open_v2(sourcename, &conn, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL); ++#else + res = sqlite3_open(sourcename, &conn); ++#endif + if (res != SQLITE_OK) + { + errmsg = sqlite3_errmsg(conn); -- cgit v1.2.3