Skip to content

Commit

Permalink
Fix build with system provided lib older than SQlite 3.31.0 from 2020…
Browse files Browse the repository at this point in the history
…-01-22
  • Loading branch information
SRombauts committed Jan 18, 2021
1 parent e779e68 commit f6b3225
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/SQLiteCpp/Database.h
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 4 additions & 0 deletions src/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f6b3225

Please sign in to comment.