File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ static unsigned int openssl_external_init = 0;
4747static unsigned int openssl_init_count = 0 ;
4848static sqlite3_mutex * openssl_rand_mutex = NULL ;
4949
50- #if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER < 0x20700000L
50+ #if (defined( OPENSSL_VERSION_NUMBER ) && OPENSSL_VERSION_NUMBER < 0x10100000L ) || (defined( LIBRESSL_VERSION_NUMBER ) && LIBRESSL_VERSION_NUMBER < 0x20700000L )
5151static HMAC_CTX * HMAC_CTX_new (void )
5252{
5353 HMAC_CTX * ctx = OPENSSL_malloc (sizeof (* ctx ));
@@ -120,7 +120,7 @@ static int sqlcipher_openssl_activate(void *ctx) {
120120
121121 if (openssl_init_count == 0 && openssl_external_init == 0 ) {
122122 /* if the library was not externally initialized, then should be now */
123- #if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER < 0x20700000L
123+ #if (defined( OPENSSL_VERSION_NUMBER ) && OPENSSL_VERSION_NUMBER < 0x10100000L ) || (defined( LIBRESSL_VERSION_NUMBER ) && LIBRESSL_VERSION_NUMBER < 0x20700000L )
124124 OpenSSL_add_all_algorithms ();
125125#endif
126126 }
@@ -157,7 +157,7 @@ static int sqlcipher_openssl_deactivate(void *ctx) {
157157 Note: this code will only be reached if OpensSSL_add_all_algorithms()
158158 is called by SQLCipher internally. This should prevent SQLCipher from
159159 "cleaning up" openssl when it was initialized externally by the program */
160- #if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER < 0x20700000L
160+ #if (defined( OPENSSL_VERSION_NUMBER ) && OPENSSL_VERSION_NUMBER < 0x10100000L ) || (defined( LIBRESSL_VERSION_NUMBER ) && LIBRESSL_VERSION_NUMBER < 0x20700000L )
161161 EVP_cleanup ();
162162#endif
163163 } else {
You can’t perform that action at this time.
0 commit comments