From 339f4d3ffefd53e0201e6ed4875a4f5e9df7cd6e Mon Sep 17 00:00:00 2001 From: Nick Parker Date: Thu, 9 Mar 2017 13:44:34 -0600 Subject: [PATCH] Exclude cipher_profile support with SQLITE_OMIT_TRACE or SQLITE_OMIT_DEPRECATED --- src/crypto_impl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/crypto_impl.c b/src/crypto_impl.c index 7818e60..9950e00 100644 --- a/src/crypto_impl.c +++ b/src/crypto_impl.c @@ -1209,6 +1209,9 @@ int sqlcipher_codec_add_random(codec_ctx *ctx, const char *zRight, int random_sz } int sqlcipher_cipher_profile(sqlite3 *db, const char *destination){ +#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED) + return SQLITE_ERROR; +#else FILE *f; if(sqlite3StrICmp(destination, "stdout") == 0){ f = stdout; @@ -1229,6 +1232,7 @@ int sqlcipher_cipher_profile(sqlite3 *db, const char *destination){ } sqlite3_profile(db, sqlcipher_profile_callback, f); return SQLITE_OK; +#endif } static void sqlcipher_profile_callback(void *file, const char *sql, sqlite3_uint64 run_time){