1
0
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:
Aaron Bannert
2001-11-20 22:23:51 +00:00
parent bbc39ab17d
commit eb519bfa8f
2 changed files with 4 additions and 4 deletions

View 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);

View 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