Re #1994 (misc): Fix linker error on Visual Studio when using OpenSSL 1.1 or newer.
Thanks to Sean Bright for the report and patch. git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5566 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
6e2f999842
commit
154238bfe0
|
@ -123,9 +123,13 @@ static unsigned get_nid_from_cid(unsigned cid)
|
|||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma comment( lib, "libeay32")
|
||||
# pragma comment( lib, "ssleay32")
|
||||
# pragma comment( lib, "crypt32")
|
||||
# if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
# pragma comment(lib, "libcrypto")
|
||||
# pragma comment(lib, "libssl")
|
||||
# else
|
||||
# pragma comment(lib, "libeay32")
|
||||
# pragma comment(lib, "ssleay32")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#if defined(PJ_HAS_SSL_SOCK) && (PJ_HAS_SSL_SOCK != 0)
|
||||
# include <openssl/rand.h>
|
||||
# include <openssl/opensslv.h>
|
||||
|
||||
/* Suppress compile warning of OpenSSL deprecation (OpenSSL is deprecated
|
||||
* since MacOSX 10.7).
|
||||
|
@ -1151,8 +1152,12 @@ static pj_status_t generate_crypto_attr_value(pj_pool_t *pool,
|
|||
|
||||
/* Include OpenSSL libraries for MSVC */
|
||||
# ifdef _MSC_VER
|
||||
# pragma comment( lib, "libeay32")
|
||||
# pragma comment( lib, "ssleay32")
|
||||
# if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
# pragma comment(lib, "libcrypto")
|
||||
# else
|
||||
# pragma comment(lib, "libeay32")
|
||||
# pragma comment(lib, "ssleay32")
|
||||
# endif
|
||||
# endif
|
||||
|
||||
err = RAND_bytes((unsigned char*)key,
|
||||
|
|
Loading…
Reference in New Issue