libssh: Fix compilation without deprecated OpenSSL APIs
[feed/packages.git] / libs / libssh / patches / 020-openssl-threads.patch
diff --git a/libs/libssh/patches/020-openssl-threads.patch b/libs/libssh/patches/020-openssl-threads.patch
new file mode 100644 (file)
index 0000000..1a801b3
--- /dev/null
@@ -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