]> granicus.if.org Git - apache/commitdiff
Gets us compiling again on FreeBSD. Adds conditional compilation around
authorAaron Bannert <aaron@apache.org>
Tue, 20 Nov 2001 22:23:51 +0000 (22:23 +0000)
committerAaron Bannert <aaron@apache.org>
Tue, 20 Nov 2001 22:23:51 +0000 (22:23 +0000)
thread mutex routines for when we don't have APR_HAS_THREADS.

Submitted by: Justin Erenkrantz
Reviewed by: Aaron Bannert

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92061 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_init.c
modules/ssl/ssl_util.c

index 73e6f21b2771819c62e1c68413d51fa55391e9b7..2e5d27fe3ba17f97fe028207e9e0beb64f06481f 100644 (file)
@@ -185,7 +185,9 @@ void ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
         ssl_init_SSLLibrary();
     }
 #endif
+#if APR_HAS_THREADS
     ssl_util_thread_setup(s, p);
+#endif
     if (mc->nInitCount == 1) {
         ssl_pphrase_Handle(s, p);
         ssl_init_TmpKeysHandle(SSL_TKP_GEN, s, p);
index 5760d021279499026f33008684231e41fcef7206..171b75e1a22665fefb5aed1f290352bd26321841 100644 (file)
@@ -334,6 +334,7 @@ SSLModConfigRec *ssl_util_getmodconfig_ssl(SSL *ssl, const char *key)
     return mc;
 }
 
+#if APR_HAS_THREADS
 /*
  * To ensure thread-safetyness in OpenSSL - work in progress
  */
@@ -352,12 +353,10 @@ static void ssl_util_thr_lock(int mode, int type, const char *file, int line)
     }
 }
 
-#if APR_HAS_THREADS
 static unsigned long ssl_util_thr_id(void)
 {
     return (unsigned long) apr_os_thread_current();
 }
-#endif
 
 static apr_status_t ssl_util_thread_cleanup(void *data)
 {
@@ -399,9 +398,7 @@ void ssl_util_thread_setup(server_rec *s, apr_pool_t *p)
         apr_thread_mutex_create(&(lock_cs[i]), APR_THREAD_MUTEX_DEFAULT, p);
     }
 
-#if APR_HAS_THREADS
     CRYPTO_set_id_callback(ssl_util_thr_id);
-#endif
 
     CRYPTO_set_locking_callback(ssl_util_thr_lock);
 
@@ -410,3 +407,4 @@ void ssl_util_thread_setup(server_rec *s, apr_pool_t *p)
                               apr_pool_cleanup_null);
 
 }
+#endif