diff --git a/include/SQLiteCpp/Database.h b/include/SQLiteCpp/Database.h index beb36265..1490fd83 100644 --- a/include/SQLiteCpp/Database.h +++ b/include/SQLiteCpp/Database.h @@ -57,7 +57,7 @@ extern const int OPEN_FULLMUTEX; // SQLITE_OPEN_FULLMUTEX extern const int OPEN_SHAREDCACHE; // SQLITE_OPEN_SHAREDCACHE /// Open database with shared cache disabled extern const int OPEN_PRIVATECACHE; // SQLITE_OPEN_PRIVATECACHE -/// Database filename is not allowed to be a symbolic link +/// Database filename is not allowed to be a symbolic link (Note: only since SQlite 3.31.0 from 2020-01-22) extern const int OPEN_NOFOLLOW; // SQLITE_OPEN_NOFOLLOW diff --git a/src/Database.cpp b/src/Database.cpp index 0f3842d7..7b81f8b9 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -36,7 +36,11 @@ const int OPEN_NOMUTEX = SQLITE_OPEN_NOMUTEX; const int OPEN_FULLMUTEX = SQLITE_OPEN_FULLMUTEX; const int OPEN_SHAREDCACHE = SQLITE_OPEN_SHAREDCACHE; const int OPEN_PRIVATECACHE = SQLITE_OPEN_PRIVATECACHE; +#if SQLITE_VERSION_NUMBER >= 3031000 const int OPEN_NOFOLLOW = SQLITE_OPEN_NOFOLLOW; +#else +const int OPEN_NOFOLLOW = 0; +#endif const int OK = SQLITE_OK;