mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
sample/https-client: check for ERR_remove_thread_state() existence
Fixes: freebsd 9.2 build
This commit is contained in:
parent
ab3bc69f47
commit
c4e9d9bd66
@ -774,7 +774,11 @@ if (NOT EVENT__DISABLE_SAMPLES)
|
|||||||
time-test)
|
time-test)
|
||||||
|
|
||||||
if (NOT EVENT__DISABLE_OPENSSL AND OPENSSL_LIBRARIES)
|
if (NOT EVENT__DISABLE_OPENSSL AND OPENSSL_LIBRARIES)
|
||||||
# Special sample with more than one file.
|
set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
|
||||||
|
CHECK_FUNCTION_EXISTS_EX(ERR_remove_thread_state EVENT__HAVE_ERR_REMOVE_THREAD_STATE)
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES "")
|
||||||
|
|
||||||
|
# Special sample with more than one file.
|
||||||
add_executable(https-client
|
add_executable(https-client
|
||||||
sample/https-client.c
|
sample/https-client.c
|
||||||
sample/openssl_hostname_validation.c
|
sample/openssl_hostname_validation.c
|
||||||
|
@ -763,6 +763,10 @@ fi
|
|||||||
|
|
||||||
# check if we have and should use openssl
|
# check if we have and should use openssl
|
||||||
AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
|
AM_CONDITIONAL(OPENSSL, [test "$enable_openssl" != "no" && test "$have_openssl" = "yes"])
|
||||||
|
if test "x$enable_openssl" = "xyes"; then
|
||||||
|
AC_SEARCH_LIBS([ERR_remove_thread_state], [crypto],
|
||||||
|
[AC_DEFINE(HAVE_ERR_REMOVE_THREAD_STATE, 1, [Define to 1 if you have ERR_remove_thread_stat().])])
|
||||||
|
fi
|
||||||
|
|
||||||
# Add some more warnings which we use in development but not in the
|
# Add some more warnings which we use in development but not in the
|
||||||
# released versions. (Some relevant gcc versions can't handle these.)
|
# released versions. (Some relevant gcc versions can't handle these.)
|
||||||
|
@ -496,4 +496,7 @@
|
|||||||
|
|
||||||
#cmakedefine EVENT__NEED_DLLIMPORT ${EVENT__NEED_DLLIMPORT}
|
#cmakedefine EVENT__NEED_DLLIMPORT ${EVENT__NEED_DLLIMPORT}
|
||||||
|
|
||||||
|
/* Define to 1 if you have ERR_remove_thread_stat(). */
|
||||||
|
#cmakedefine EVENT__HAVE_ERR_REMOVE_THREAD_STATE 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -471,7 +471,11 @@ cleanup:
|
|||||||
EVP_cleanup();
|
EVP_cleanup();
|
||||||
ERR_free_strings();
|
ERR_free_strings();
|
||||||
|
|
||||||
|
#ifdef EVENT__HAVE_ERR_REMOVE_THREAD_STATE
|
||||||
ERR_remove_thread_state(NULL);
|
ERR_remove_thread_state(NULL);
|
||||||
|
#else
|
||||||
|
ERR_remove_state(0);
|
||||||
|
#endif
|
||||||
CRYPTO_cleanup_all_ex_data();
|
CRYPTO_cleanup_all_ex_data();
|
||||||
|
|
||||||
sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
|
sk_SSL_COMP_free(SSL_COMP_get_compression_methods());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user