You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <je...@ebuilt.com> on 2001/11/20 04:10:37 UTC

[PATCH] mod_ssl patch was Re: [2.0] does not compile without threads

On Mon, Nov 19, 2001 at 02:37:10PM -0800, Ryan Bloom wrote:
> I wouldn't #error, I would just #ifdef the whole file personally.  Otherwise, you will
> need to conditionally include the header file, which always seem like more trouble
> than it's worth.  But that is just a personal preference of mine.

My $.02.  Gets me building again.  If you don't have threads,
just don't call anything.  Makes sense to me.  -- justin

Index: modules/ssl/ssl_util.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_util.c,v
retrieving revision 1.19
diff -u -r1.19 ssl_util.c
--- modules/ssl/ssl_util.c	2001/11/16 18:28:25	1.19
+++ modules/ssl/ssl_util.c	2001/11/20 02:54:32
@@ -334,6 +334,7 @@
     return mc;
 }
 
+#if APR_HAS_THREADS
 /*
  * To ensure thread-safetyness in OpenSSL - work in progress
  */
@@ -352,12 +353,10 @@
     }
 }
 
-#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 @@
         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 @@
                               apr_pool_cleanup_null);
 
 }
+#endif
Index: modules/ssl/ssl_engine_init.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v
retrieving revision 1.13
diff -u -r1.13 ssl_engine_init.c
--- modules/ssl/ssl_engine_init.c	2001/08/24 23:25:14	1.13
+++ modules/ssl/ssl_engine_init.c	2001/11/20 02:54:32
@@ -185,7 +185,9 @@
         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);