diff options
author | Ted Trask <ttrask01@yahoo.com> | 2014-11-28 00:19:16 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2014-11-28 14:59:03 +0000 |
commit | c366711f7a54537b83c49a1ce3951fd3858ffd1b (patch) | |
tree | 2dc046c23ab81f889aa715bfa45ef3b6e1b96a89 /main/lua-sql/sqlite_v2_api.patch | |
parent | 2ddf2db655be2079308cfba74d32e3a38d7f902e (diff) | |
download | aports-c366711f7a54537b83c49a1ce3951fd3858ffd1b.tar.bz2 aports-c366711f7a54537b83c49a1ce3951fd3858ffd1b.tar.xz |
main/lua-sql: Add sqlite patch, bump pkgrel
Add patch to make sqlite pragmas work
https://github.com/keplerproject/luasql/pull/8/files
Diffstat (limited to 'main/lua-sql/sqlite_v2_api.patch')
-rw-r--r-- | main/lua-sql/sqlite_v2_api.patch | 26 |
1 files changed, 26 insertions, 0 deletions
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); |