diff options
author | June McEnroe <june@causal.agency> | 2021-09-12 18:45:02 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-09-12 18:45:02 -0400 |
commit | 7346609955c63d808eeedd40a28d609a31b651c8 (patch) | |
tree | 98e4bfd691f2c7f6ece69d1be35378865b128ae1 | |
parent | Vendor SQLite 3.36.0 (diff) | |
download | scooper-7346609955c63d808eeedd40a28d609a31b651c8.tar.gz scooper-7346609955c63d808eeedd40a28d609a31b651c8.zip |
Call sqlite3_initialize explicitly
-rw-r--r-- | server.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |