From c2f17ad937d410180f511365b05bf06985823137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 4 Mar 2013 12:46:14 +0100 Subject: [PATCH] Fixed build of SSL when using android-no-sdk. Introduced Q_OS_ANDROID_NO_SDK which makes more sense than Q_OS_LINUX_ANDROID when Q_OS_ANDROID also defines Q_OS_LINUX. Change-Id: Id2aa228b66daffba82776a12c91a264a360afd86 Reviewed-by: Gunnar Sletta --- mkspecs/unsupported/android-g++/qmake.conf | 2 +- src/network/ssl/qsslsocket_openssl_symbols.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mkspecs/unsupported/android-g++/qmake.conf b/mkspecs/unsupported/android-g++/qmake.conf index fb325f156c..8f805f176a 100644 --- a/mkspecs/unsupported/android-g++/qmake.conf +++ b/mkspecs/unsupported/android-g++/qmake.conf @@ -47,7 +47,7 @@ include(../../common/gcc-base-unix.conf) CONFIG = qt warn_on release link_prl QT = core gui -DEFINES += Q_OS_LINUX_ANDROID HAVE_ANDROID_OS +DEFINES += Q_OS_LINUX_ANDROID HAVE_ANDROID_OS Q_OS_ANDROID_NO_SDK DEFINES += Q_ANDROID_VERSION_MAJOR=$$ANDROID_VERSION_MAJOR DEFINES += Q_ANDROID_VERSION_MINOR=$$ANDROID_VERSION_MINOR DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG QT_NO_EXCEPTIONS diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index 2be62515e8..fed99752b0 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -67,7 +67,7 @@ #if defined(Q_OS_UNIX) #include #endif -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID_NO_SDK) #include #endif @@ -383,7 +383,7 @@ static bool libGreaterThan(const QString &lhs, const QString &rhs) return true; } -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID_NO_SDK) static int dlIterateCallback(struct dl_phdr_info *info, size_t size, void *data) { if (size < sizeof (info->dlpi_addr) + sizeof (info->dlpi_name)) @@ -414,7 +414,9 @@ static QStringList libraryPathList() paths << QLatin1String("/lib64") << QLatin1String("/usr/lib64") << QLatin1String("/usr/local/lib64"); paths << QLatin1String("/lib32") << QLatin1String("/usr/lib32") << QLatin1String("/usr/local/lib32"); -#ifdef Q_OS_LINUX +#if defined(Q_OS_ANDROID_NO_SDK) + paths << QLatin1String("/system/lib"); +#elif defined(Q_OS_LINUX) // discover paths of already loaded libraries QSet loadedPaths; dl_iterate_phdr(dlIterateCallback, &loadedPaths);