summaryrefslogtreecommitdiffstats
path: root/tdeio
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2019-02-23 16:35:21 +0100
committerSlávek Banko <[email protected]>2019-02-27 20:18:17 +0100
commit33c3818ac59fda3a00b7cff19fd3b1f09296fe5d (patch)
tree0d5d3e3353303d875922d428ae28464e9d121930 /tdeio
parent89609911f85667e0e46b89e15023081cd6724677 (diff)
downloadtdelibs-33c3818ac59fda3a00b7cff19fd3b1f09296fe5d.tar.gz
tdelibs-33c3818ac59fda3a00b7cff19fd3b1f09296fe5d.zip
Use system libdir when searching for dynamically loaded libraries.
This prevents finding an incorrect architecture on multi-arch systems. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 8a859540c3cb306844288144a06028dc302408d6)
Diffstat (limited to 'tdeio')
-rw-r--r--tdeio/kssl/kopenssl.cc41
1 files changed, 8 insertions, 33 deletions
diff --git a/tdeio/kssl/kopenssl.cc b/tdeio/kssl/kopenssl.cc
index ded836fde..9c6d47ad4 100644
--- a/tdeio/kssl/kopenssl.cc
+++ b/tdeio/kssl/kopenssl.cc
@@ -28,7 +28,6 @@
#include <tdeconfig.h>
#include <kstaticdeleter.h>
#include <tqregexp.h>
-#include <tqdir.h>
#include <stdio.h>
#include <unistd.h>
@@ -324,7 +323,7 @@ TDEConfig *cfg;
#ifdef __OpenBSD__
{
- TQString libname = findMostRecentLib("/usr/lib" KDELIBSUFF, "crypto");
+ TQString libname = findMostRecentLib("/usr/" SYSTEM_LIBDIR, "crypto");
if (!libname.isNull())
_cryptoLib = ll->globalLibrary(libname.latin1());
}
@@ -349,13 +348,13 @@ TDEConfig *cfg;
#ifdef _AIX
<< "/opt/freeware/lib/"
#endif
- << "/usr/lib" KDELIBSUFF "/"
- << "/usr/ssl/lib" KDELIBSUFF "/"
- << "/usr/local/lib" KDELIBSUFF "/"
- << "/usr/local/openssl/lib" KDELIBSUFF "/"
- << "/usr/local/ssl/lib" KDELIBSUFF "/"
- << "/opt/openssl/lib" KDELIBSUFF "/"
- << "/lib" KDELIBSUFF "/"
+ << "/usr/" SYSTEM_LIBDIR "/"
+ << "/usr/ssl/" SYSTEM_LIBDIR "/"
+ << "/usr/local/" SYSTEM_LIBDIR "/"
+ << "/usr/local/openssl/" SYSTEM_LIBDIR "/"
+ << "/usr/local/ssl/" SYSTEM_LIBDIR "/"
+ << "/opt/openssl/" SYSTEM_LIBDIR "/"
+ << "/" SYSTEM_LIBDIR "/"
<< "";
// FIXME: #define here for the various OS types to optimize
@@ -408,18 +407,6 @@ TDEConfig *cfg;
tmpStr.replace(TQRegExp("\\(.*\\)"), "");
if (!access(tmpStr.latin1(), R_OK))
_cryptoLib = ll->globalLibrary(alib.latin1());
- if (!_cryptoLib) {
- // Multiarch triplet search
- TQDir madir (*it);
- TQStringList multiarchdirs = madir.entryList("*-*-*", TQDir::Dirs);
- for (TQStringList::Iterator mait = multiarchdirs.begin(); mait != multiarchdirs.end(); ++mait ) {
- TQString malib = *it + *mait + "/" + *shit;
- TQString tmpStr(malib.latin1());
- tmpStr.replace(TQRegExp("\\(.*\\)"), "");
- if (!access(tmpStr.latin1(), R_OK))
- _cryptoLib = ll->globalLibrary(malib.latin1());
- }
- }
if (_cryptoLib) break;
}
if (_cryptoLib) break;
@@ -611,18 +598,6 @@ TDEConfig *cfg;
tmpStr.replace(TQRegExp("\\(.*\\)"), "");
if (!access(tmpStr.latin1(), R_OK))
_sslLib = ll->globalLibrary(alib.latin1());
- if (!_sslLib) {
- // Multiarch triplet search
- TQDir madir (*it);
- TQStringList multiarchdirs = madir.entryList("*-*-*", TQDir::Dirs);
- for (TQStringList::Iterator mait = multiarchdirs.begin(); mait != multiarchdirs.end(); ++mait ) {
- TQString malib = *it + *mait + "/" + *shit;
- TQString tmpStr(malib.latin1());
- tmpStr.replace(TQRegExp("\\(.*\\)"), "");
- if (!access(tmpStr.latin1(), R_OK))
- _sslLib = ll->globalLibrary(malib.latin1());
- }
- }
if (_sslLib) break;
}
if (_sslLib) break;