diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-06-25 18:36:12 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-06-27 16:42:16 +0100 |
commit | f9f7de41d4acd3b1fa5ace198db21e28a3f5e035 (patch) | |
tree | d64c7456b0b1b0f0cc1fdd1bf121c88359d94b3f /src/libstat/backends | |
parent | c3e0d7c4aa3c1bbce34776299359460be8861434 (diff) | |
download | rspamd-f9f7de41d4acd3b1fa5ace198db21e28a3f5e035.tar.gz rspamd-f9f7de41d4acd3b1fa5ace198db21e28a3f5e035.zip |
Add workaround for ancient sqlite.
Diffstat (limited to 'src/libstat/backends')
-rw-r--r-- | src/libstat/backends/sqlite3_backend.c | 6 |
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; } |