Threads and OpenSSL

Daniel Eischen eischen at vigrid.com
Thu Mar 25 13:30:11 PST 2004


On Thu, 25 Mar 2004, David Malone wrote:

> 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

You don't need _REENTRANT, _THREAD_SAFE, or _THREADSAFE for
our libc.

-- 
Dan Eischen



More information about the freebsd-threads mailing list