From 7346609955c63d808eeedd40a28d609a31b651c8 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sun, 12 Sep 2021 18:45:02 -0400 Subject: Call sqlite3_initialize explicitly --- server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.c b/server.c index 6280b4d..de5a8d7 100644 --- a/server.c +++ b/server.c @@ -110,7 +110,10 @@ int main(int argc, char *argv[]) { if (optind < argc) path = argv[optind]; if (!path) errx(EX_USAGE, "database path required"); - int error = sqlite3_open_v2(path, &db, SQLITE_OPEN_READONLY, NULL); + int error = sqlite3_initialize(); + if (error) errx(EX_SOFTWARE, "sqlite3_initialize"); + + error = sqlite3_open_v2(path, &db, SQLITE_OPEN_READONLY, NULL); if (error) errx(EX_NOINPUT, "%s: %s", path, sqlite3_errmsg(db)); sqlite3_busy_timeout(db, 1000); atexit(finalizeAll); -- cgit 1.4.1