From: Jürgen Weigert Date: Wed, 27 Sep 2017 20:35:12 +0000 (+0200) Subject: support old sqlite before 3.7.7 X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~700^2^2~36 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=28fe903aee8bbc608a17bfdfb87e5c7c0e0cf7a4;p=nextcloud-desktop.git support old sqlite before 3.7.7 quickfix: define the symbol for backwards compat or FIXME: better solution #ifdef SQLITE_IOERR_SHMMAP where needed... --- diff --git a/src/common/syncjournaldb.cpp b/src/common/syncjournaldb.cpp index d4c396e6b..b827657c7 100644 --- a/src/common/syncjournaldb.cpp +++ b/src/common/syncjournaldb.cpp @@ -345,6 +345,12 @@ bool SyncJournalDb::checkConnect() "PRIMARY KEY(phash)" ");"); +#ifndef SQLITE_IOERR_SHMMAP +// Requires sqlite >= 3.7.7 but old CentOS6 has sqlite-3.6.20 +// Definition taken from https://sqlite.org/c3ref/c_abort_rollback.html +#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8)) +#endif + if (!createQuery.exec()) { // In certain situations the io error can be avoided by switching // to the DELETE journal mode, see #5723