]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
sqlite: Fix build with DEBUG_LEVEL < 2
authorTobias Brunner <tobias@strongswan.org>
Tue, 18 Apr 2023 14:46:02 +0000 (16:46 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 8 May 2023 12:07:18 +0000 (14:07 +0200)
src/libstrongswan/plugins/sqlite/sqlite_plugin.c

index 58259841ce5af6ffaa2f4a10ffe7359ff3f18d40..8812c9947c2e5453e7fc4a463ac0702fcd34c371 100644 (file)
@@ -62,7 +62,9 @@ METHOD(plugin_t, destroy, void,
 plugin_t *sqlite_plugin_create()
 {
        private_sqlite_plugin_t *this;
+#if SQLITE_VERSION_NUMBER >= 3005000 && DEBUG_LEVEL >= 2
        int threadsafe = 0;
+#endif
 
        INIT(this,
                .public = {
@@ -74,7 +76,7 @@ plugin_t *sqlite_plugin_create()
                },
        );
 
-#if SQLITE_VERSION_NUMBER >= 3005000
+#if SQLITE_VERSION_NUMBER >= 3005000 && DEBUG_LEVEL >= 2
        threadsafe = sqlite3_threadsafe();
 #endif
        DBG2(DBG_LIB, "using SQLite %s, thread safety %d",