Commit b495c406 authored by Adrien Béraud's avatar Adrien Béraud Committed by gerrit2
Browse files

contrib/pjsip: add missing patch for 2.4.5

Make sure to not include OpenSSL when GnuTLS is used.

Tuleap: #77
Change-Id: I6f3ee4b80471d2562c6c5ef1ebb17cdc0002760a
parent 7de79eb7
......@@ -3347,3 +3347,27 @@ index 40a5a1e..9237898 100644
#define THIS_FILE "ssl_sock_ossl.c"
diff --git a/pjmedia/src/pjmedia/transport_srtp.c b/pjmedia/src/pjmedia/transport_srtp.c
index ac74cb8..026d3a8 100644
--- a/pjmedia/src/pjmedia/transport_srtp.c
+++ b/pjmedia/src/pjmedia/transport_srtp.c
@@ -30,7 +30,8 @@
#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
-#if defined(PJ_HAS_SSL_SOCK) && (PJ_HAS_SSL_SOCK != 0)
+#if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK != 0 && \
+ defined(PJ_HAS_TLS_SOCK) && PJ_HAS_TLS_SOCK == 0
# include <openssl/rand.h>
/* Suppress compile warning of OpenSSL deprecation (OpenSSL is deprecated
@@ -1098,7 +1099,8 @@ static pj_status_t generate_crypto_attr_value(pj_pool_t *pool,
key_ok = PJ_TRUE;
-#if defined(PJ_HAS_SSL_SOCK) && (PJ_HAS_SSL_SOCK != 0)
+#if defined(PJ_HAS_SSL_SOCK) && PJ_HAS_SSL_SOCK != 0 && \
+ defined(PJ_HAS_TLS_SOCK) && PJ_HAS_TLS_SOCK == 0
/* Include OpenSSL libraries for MSVC */
# ifdef _MSC_VER
Supports Markdown
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