Threads and OpenSSL

David Malone dwmalone at maths.tcd.ie
Thu Mar 25 12:19:19 PST 2004


I'd like to commit the patch in PR 51205, that compiles the OpenSSL
library in a way that allows it to be used in threaded programs.
This prevents things like radius daemons blowing up.

The patch is quite simple, but I though I'd better run it past the
threads people before I committed it.

	David.

diff -u -r1.36 Makefile.inc
--- Makefile.inc        17 Mar 2004 16:15:45 -0000      1.36
+++ Makefile.inc        18 Mar 2004 15:18:04 -0000
@@ -5,6 +5,7 @@
 
 CFLAGS+=       -DTERMIOS -DANSI_SOURCE
 CFLAGS+=       -I${LCRYPTO_SRC} -I${LCRYPTO_SRC}/crypto -I${.OBJDIR}
+CFLAGS+=       -DOPENSSL_THREADS -pthread -D_REENTRANT -D_THREAD_SAFE -D_THREADSAFE
 
 .if !defined(MAKE_IDEA) || ${MAKE_IDEA} != YES
 CFLAGS+=       -DOPENSSL_NO_IDEA



More information about the freebsd-threads mailing list