summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-03-11 10:18:27 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-03-11 10:21:26 -0700
commitbb73dbcd3012c86c0251d075cf4360dcb16f1de9 (patch)
treea03adf141f5ff8f82b961c804ffcfbabb1432a30 /platform
parent24c7239e35531caa693b174ec8d31c42680b146a (diff)
downloadqtlocation-mapboxgl-bb73dbcd3012c86c0251d075cf4360dcb16f1de9.tar.gz
Relax sqlite version check to major version only
iOS 8.2 updates the included SQLite version to 3.8.4, while iOS 7.0 up to iOS 8.1 provides version 3.7.13. When compiling with the 8.2 SDK and running on 8.1 or below, or vice versa, a strict check fails. Fixes #968.
Diffstat (limited to 'platform')
-rw-r--r--platform/default/sqlite3.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/platform/default/sqlite3.cpp b/platform/default/sqlite3.cpp
index 6a27314c56..19ecaba0bf 100644
--- a/platform/default/sqlite3.cpp
+++ b/platform/default/sqlite3.cpp
@@ -6,20 +6,13 @@
// Check sqlite3 library version.
const static bool sqliteVersionCheck = []() {
- if (sqlite3_libversion_number() != SQLITE_VERSION_NUMBER) {
+ if (sqlite3_libversion_number() / 1000000 != SQLITE_VERSION_NUMBER / 1000000) {
char message[96];
snprintf(message, 96,
"sqlite3 libversion mismatch: headers report %d, but library reports %d",
SQLITE_VERSION_NUMBER, sqlite3_libversion_number());
throw std::runtime_error(message);
}
- if (strcmp(sqlite3_sourceid(), SQLITE_SOURCE_ID) != 0) {
- char message[256];
- snprintf(message, 256,
- "sqlite3 sourceid mismatch: headers report \"%s\", but library reports \"%s\"",
- SQLITE_SOURCE_ID, sqlite3_sourceid());
- throw std::runtime_error(message);
- }
return true;
}();