[stunnel-users] stunnel 5.20 issue using "--with-threads=ucontext"
Michael Gebis
mgebis at countertack.com
Mon Jul 20 21:24:13 CEST 2015
Hello.
We recently upgraded from stunnel 5.10 to 5.20. We compile using
"--with-threads=ucontext" and with this flag, compilation of 5.20
fails in two places.
Both failures seem like minor oversights. Here is a proposed patch to
fix the two failures. This patch is against 5.20, but I just checked
the most recent 5.21b2 and it appears to require the same changes.
Thanks!
Michael
diff -ru stunnel-5.20.orig/src/cron.c stunnel-5.20-ucontext-fix/src/cron.c
--- stunnel-5.20.orig/src/cron.c 2015-07-16 15:55:52.214064748 -0700
+++ stunnel-5.20-ucontext-fix/src/cron.c 2015-07-16 16:15:56.593107354 -0700
@@ -47,7 +47,9 @@
#if defined(USE_PTHREAD) || defined(USE_WIN32)
NOEXPORT void cron_worker(void);
NOEXPORT void cron_dh_param(void);
-#endif
+#elif !defined(OPENSSL_NO_DH)
+NOEXPORT void cron_dh_param(void);
+#endif
#if defined(USE_PTHREAD)
diff -ru stunnel-5.20.orig/src/tls.c stunnel-5.20-ucontext-fix/src/tls.c
--- stunnel-5.20.orig/src/tls.c 2015-07-16 15:55:52.180064660 -0700
+++ stunnel-5.20-ucontext-fix/src/tls.c 2015-07-16 15:56:30.520164252 -0700
@@ -110,7 +110,7 @@
if(ready_head)
ready_head->tls=tls_data;
else /* ucontext threads not initialized */
- global_tls=tls;
+ global_tls=tls_data;
}
TLS_DATA *tls_get() {
More information about the stunnel-users
mailing list