Skip to content

Commit

Permalink
db_sqlite: add backwards compatibility to extension load
Browse files Browse the repository at this point in the history
Backwards compatibility for 4dfa622
  • Loading branch information
razvancrainea committed Jan 20, 2025
1 parent 257897d commit b113db6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/db_sqlite/sqlite_con.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ int db_sqlite_connect(struct sqlite_con* ptr)

/* trying to load extensions */
if (extension_list) {
#ifdef SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION
if (sqlite3_db_config(con, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, NULL) != SQLITE_OK) {
#else
if (sqlite3_enable_load_extension(con, 1)) {
#endif
LM_ERR("failed to enable extension loading: %s\n", sqlite3_errmsg(con));
return -1;
}
Expand Down

0 comments on commit b113db6

Please sign in to comment.