Skip to content

Commit

Permalink
db_sqlite: add backwards compatibility to extension load
Browse files Browse the repository at this point in the history
complete commit b113db6
  • Loading branch information
razvancrainea committed Jan 21, 2025
1 parent b113db6 commit eb38e44
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 @@ -122,7 +122,11 @@ int db_sqlite_connect(struct sqlite_con* ptr)
LM_DBG("Extension [%s] loaded!\n", iter->ldpath);
}

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

0 comments on commit eb38e44

Please sign in to comment.