From d4ff61fd2eaaac4eba2adebee54a8b18187a6a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Guzm=C3=A1n?= Date: Tue, 13 Dec 2022 19:37:17 -0600 Subject: [PATCH] check if SQLITE_OPEN_NOFOLLOW is defined under MacOS 11 BigSur(macos-latest) the macro SQLITE_OPEN_NOFOLLOW is not defined so it may cause compilation issues for those versions --- src/Database.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Database.cpp b/src/Database.cpp index f6e2f07b..812f5f8d 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -37,7 +37,8 @@ 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 +// check if sqlite version is >= 3.31.0 and SQLITE_OPEN_NOFOLLOW is defined +#if SQLITE_VERSION_NUMBER >= 3031000 && defined(SQLITE_OPEN_NOFOLLOW) const int OPEN_NOFOLLOW = SQLITE_OPEN_NOFOLLOW; #else const int OPEN_NOFOLLOW = 0;