QNX: adapt SSL lib file name lookup heuristics
I.e. do not try to load file names that are not there anyhow. The code would search for libcrypto.so.1.0.0 and libssl.so.1.0.0, while on QNX the libs are called libcrypto.so and libssl.so, and there are no symlinks with version numbers. This saves ~ 45 ms in real apps (tested with Facebook, Twitter and Foursquare), and ~ 24 ms at app startup in an isolated app without GUI (difference maybe because threads are fighting for CPU or so). Task-number: QTBUG-32548 Change-Id: I25869538bbfa3c2848541415e8361e0bd7a8fd50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
1aa4ad46e4
commit
69b31f7b65
@ -550,7 +550,7 @@ static QPair<QLibrary*, QLibrary*> loadOpenSsl()
|
||||
#ifdef Q_OS_OPENBSD
|
||||
libcrypto->setLoadHints(QLibrary::ExportExternalSymbolsHint);
|
||||
#endif
|
||||
#ifdef SHLIB_VERSION_NUMBER
|
||||
#if defined(SHLIB_VERSION_NUMBER) && !defined(Q_OS_QNX) // on QNX, the libs are always libssl.so and libcrypto.so
|
||||
// first attempt: the canonical name is libssl.so.<SHLIB_VERSION_NUMBER>
|
||||
libssl->setFileNameAndVersion(QLatin1String("ssl"), QLatin1String(SHLIB_VERSION_NUMBER));
|
||||
libcrypto->setFileNameAndVersion(QLatin1String("crypto"), QLatin1String(SHLIB_VERSION_NUMBER));
|
||||
|
Loading…
Reference in New Issue
Block a user