libssh: Fix compilation without deprecated OpenSSL APIs

Last patch was already fixed upstream. First patch was sent.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2019-04-28 16:48:16 -07:00
parent 0038d6e971
commit 2d440dd267
3 changed files with 68 additions and 1 deletions
@@ -0,0 +1,28 @@
--- a/src/threads.c
+++ b/src/threads.c
@@ -106,6 +106,8 @@ static int libgcrypt_thread_init(void){
static void **libcrypto_mutexes;
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+
static void libcrypto_lock_callback(int mode, int i, const char *file, int line){
(void)file;
(void)line;
@@ -160,6 +162,16 @@ static void libcrypto_thread_finalize(void){
}
+#else
+
+static int libcrypto_thread_init(void){
+ return SSH_OK;
+}
+
+static void libcrypto_thread_finalize(void){
+}
+#endif
+
#endif
/** @internal