[rtmpdump] [PATCH] OPENSSL crypto: SSL_load_error_strings and SSL_library_init are not reentrant

Martin Storsjö martin at martin.st
Mon Jul 7 08:37:35 CEST 2014


On Wed, 4 Jun 2014, Rafaël Carré wrote:

> ---
> librtmp/Makefile |  2 +-
> librtmp/rtmp.c   | 20 ++++++++++++++------
> 2 files changed, 15 insertions(+), 7 deletions(-)
>
> diff --git a/librtmp/Makefile b/librtmp/Makefile
> index 2c1c790..861933d 100644
> --- a/librtmp/Makefile
> +++ b/librtmp/Makefile
> @@ -30,7 +30,7 @@ LIBS_posix=
> LIBS_darwin=
> LIBS_mingw=-lws2_32 -lwinmm -lgdi32
> LIB_GNUTLS=-lgnutls -lhogweed -lnettle -lgmp $(LIBZ)
> -LIB_OPENSSL=-lssl -lcrypto $(LIBZ)
> +LIB_OPENSSL=-lssl -lcrypto $(LIBZ) -lpthread
> LIB_POLARSSL=-lpolarssl $(LIBZ)
> PRIVATE_LIBS=$(LIBS_$(SYS))
> CRYPTO_LIB=$(LIB_$(CRYPTO)) $(PRIVATE_LIBS)

This is probably useful in general, but I'm not sure about adding a 
dependency on pthreads unconditionally. What about adding 
$(LIB_OPENSSL_$(SYS)) here, and including -lpthread in LIB_OPENSSL_posix 
and LIB_OPENSSL_darwin? This probably needs a define to go with it, 
allowing building for windows without pthreads.

// Martin


More information about the rtmpdump mailing list