mirror of
https://github.com/apache/httpd.git
synced 2025-08-01 07:26:57 +03:00
Gets us compiling again on FreeBSD. Adds conditional compilation around
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
This commit is contained in:
@ -185,7 +185,9 @@ void ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
|
|||||||
ssl_init_SSLLibrary();
|
ssl_init_SSLLibrary();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if APR_HAS_THREADS
|
||||||
ssl_util_thread_setup(s, p);
|
ssl_util_thread_setup(s, p);
|
||||||
|
#endif
|
||||||
if (mc->nInitCount == 1) {
|
if (mc->nInitCount == 1) {
|
||||||
ssl_pphrase_Handle(s, p);
|
ssl_pphrase_Handle(s, p);
|
||||||
ssl_init_TmpKeysHandle(SSL_TKP_GEN, s, p);
|
ssl_init_TmpKeysHandle(SSL_TKP_GEN, s, p);
|
||||||
|
@ -334,6 +334,7 @@ SSLModConfigRec *ssl_util_getmodconfig_ssl(SSL *ssl, const char *key)
|
|||||||
return mc;
|
return mc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if APR_HAS_THREADS
|
||||||
/*
|
/*
|
||||||
* To ensure thread-safetyness in OpenSSL - work in progress
|
* 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)
|
static unsigned long ssl_util_thr_id(void)
|
||||||
{
|
{
|
||||||
return (unsigned long) apr_os_thread_current();
|
return (unsigned long) apr_os_thread_current();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static apr_status_t ssl_util_thread_cleanup(void *data)
|
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);
|
apr_thread_mutex_create(&(lock_cs[i]), APR_THREAD_MUTEX_DEFAULT, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if APR_HAS_THREADS
|
|
||||||
CRYPTO_set_id_callback(ssl_util_thr_id);
|
CRYPTO_set_id_callback(ssl_util_thr_id);
|
||||||
#endif
|
|
||||||
|
|
||||||
CRYPTO_set_locking_callback(ssl_util_thr_lock);
|
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);
|
apr_pool_cleanup_null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user