]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Wrap all uses of ssl_mutexes in the same ifdef
authorNick Porter <nick@portercomputing.co.uk>
Tue, 4 Apr 2023 15:15:16 +0000 (16:15 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 4 Apr 2023 15:15:16 +0000 (16:15 +0100)
src/main/threads.c

index bd5537e831ba06dc3c078f3025df73cb55b97b28..3553fbb91baebda2421cacb49a1fbba34ff1e4f3 100644 (file)
@@ -248,9 +248,9 @@ static const CONF_PARSER thread_config[] = {
  *     to add them at some point.
  */
 
+#ifdef HAVE_CRYPTO_SET_LOCKING_CALLBACK
 static pthread_mutex_t *ssl_mutexes = NULL;
 
-#ifdef HAVE_CRYPTO_SET_LOCKING_CALLBACK
 static void ssl_locking_function(int mode, int n, UNUSED char const *file, UNUSED int line)
 {
        if (mode & CRYPTO_LOCK) {
@@ -289,6 +289,7 @@ int tls_mutexes_init(void)
 
 static void tls_mutexes_destroy(void)
 {
+#ifdef HAVE_CRYPTO_SET_LOCKING_CALLBACK
        int i, num;
 
        num = CRYPTO_num_locks();
@@ -299,6 +300,7 @@ static void tls_mutexes_destroy(void)
        free(ssl_mutexes);
 
        CRYPTO_set_locking_callback(NULL);
+#endif
 }
 #else
 #define tls_mutexes_destroy