Commit e126baaf authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-9249 MariaDB un-buildable on linux64: fails @ "error: ‘ERR_remove_state’...

MDEV-9249 MariaDB un-buildable on linux64: fails @ "error: ‘ERR_remove_state’ was not declared in this scope" when linking against OpenSSL 1.0.2e

ERR_remove_state is deprecated, use ERR_remove_thread_state
if possible
parent 591e74c7
......@@ -26,6 +26,7 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
SET(SSL_INCLUDE_DIRS ${INC_DIRS})
SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PURE_C -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED")
SET(HAVE_ERR_remove_thread_state OFF CACHE INTERNAL "yassl doesn't have ERR_remove_thread_state")
CHANGE_SSL_SETTINGS("bundled")
#Remove -fno-implicit-templates
#(yassl sources cannot be compiled with it)
......@@ -70,9 +71,13 @@ MACRO (MYSQL_CHECK_SSL)
MARK_AS_ADVANCED(CRYPTO_LIBRARY)
INCLUDE(CheckSymbolExists)
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
HAVE_SHA512_DIGEST_LENGTH)
CHECK_SYMBOL_EXISTS(ERR_remove_thread_state "openssl/err.h"
HAVE_ERR_remove_thread_state)
SET(CMAKE_REQUIRED_INCLUDES)
SET(CMAKE_REQUIRED_LIBRARIES)
IF(OPENSSL_FOUND AND CRYPTO_LIBRARY AND HAVE_SHA512_DIGEST_LENGTH)
SET(SSL_SOURCES "")
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARY})
......
......@@ -465,7 +465,7 @@
#cmakedefine HAVE_BSD_SIGNALS 1
#cmakedefine HAVE_SVR3_SIGNALS 1
#cmakedefine HAVE_V7_SIGNALS 1
#cmakedefine HAVE_ERR_remove_thread_state 1
#cmakedefine HAVE_SOLARIS_STYLE_GETHOST 1
......
......@@ -123,6 +123,10 @@ typedef my_socket YASSL_SOCKET_T;
#include <openssl/ssl.h>
#include <openssl/err.h>
#ifdef HAVE_ERR_remove_thread_state
#define ERR_remove_state(X) ERR_remove_thread_state(NULL)
#endif
enum enum_ssl_init_error
{
SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment