Changeset 5566


Ignore:
Timestamp:
Mar 9, 2017 4:41:45 AM (3 years ago)
Author:
riza
Message:

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.

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c

    r5565 r5566  
    124124 
    125125#ifdef _MSC_VER 
    126 #  pragma comment( lib, "libeay32") 
    127 #  pragma comment( lib, "ssleay32") 
    128 #  pragma comment( lib, "crypt32") 
     126#  if OPENSSL_VERSION_NUMBER >= 0x10100000L 
     127#    pragma comment(lib, "libcrypto") 
     128#    pragma comment(lib, "libssl") 
     129#  else 
     130#    pragma comment(lib, "libeay32") 
     131#    pragma comment(lib, "ssleay32") 
     132#  endif 
    129133#endif 
    130134 
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c

    r5520 r5566  
    3333#if defined(PJ_HAS_SSL_SOCK) && (PJ_HAS_SSL_SOCK != 0) 
    3434#  include <openssl/rand.h> 
     35#  include <openssl/opensslv.h> 
    3536 
    3637/* Suppress compile warning of OpenSSL deprecation (OpenSSL is deprecated 
     
    11521153/* Include OpenSSL libraries for MSVC */ 
    11531154#  ifdef _MSC_VER 
    1154 #    pragma comment( lib, "libeay32") 
    1155 #    pragma comment( lib, "ssleay32") 
     1155#    if OPENSSL_VERSION_NUMBER >= 0x10100000L 
     1156#      pragma comment(lib, "libcrypto") 
     1157#    else 
     1158#      pragma comment(lib, "libeay32") 
     1159#      pragma comment(lib, "ssleay32") 
     1160#    endif 
    11561161#  endif 
    11571162 
Note: See TracChangeset for help on using the changeset viewer.