aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstat/backends')
-rw-r--r--src/libstat/backends/sqlite3_backend.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstat/backends/sqlite3_backend.c b/src/libstat/backends/sqlite3_backend.c
index f2b5a226c..79198976e 100644
--- a/src/libstat/backends/sqlite3_backend.c
+++ b/src/libstat/backends/sqlite3_backend.c
@@ -332,9 +332,15 @@ rspamd_sqlite3_opendb (const gchar *path, const ucl_object_t *opts,
if ((rc = sqlite3_open_v2 (path, &sqlite,
flags, NULL)) != SQLITE_OK) {
+#if SQLITE_VERSION_NUMBER >= 3007015
g_set_error (err, rspamd_sqlite3_quark (),
rc, "cannot open sqlite db %s: %s",
path, sqlite3_errstr (rc));
+#else
+ g_set_error (err, rspamd_sqlite3_quark (),
+ rc, "cannot open sqlite db %s: %d",
+ path, rc);
+#endif
return NULL;
}