diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,7 +17,7 @@ add_subdirectory(urifilters) add_subdirectory(kcms) -if(NOT WIN32) +if(NOT WIN32 AND NOT ANDROID) # arpa/nameser.h add_subdirectory(kpac) endif() diff --git a/src/core/kmountpoint.h b/src/core/kmountpoint.h --- a/src/core/kmountpoint.h +++ b/src/core/kmountpoint.h @@ -83,6 +83,8 @@ * This function gives a list of all currently used mountpoints. (mtab) * @param infoNeeded Flags that specify which additional information * should be fetched. + * + * @note this method will return an empty list on Android */ static List currentMountPoints(DetailsNeededFlags infoNeeded = BasicInfoNeeded); diff --git a/src/core/kmountpoint.cpp b/src/core/kmountpoint.cpp --- a/src/core/kmountpoint.cpp +++ b/src/core/kmountpoint.cpp @@ -414,7 +414,7 @@ mp->d->mountPoint = QString("/"); result.append(mp); -#else +#elif !defined(Q_OS_ANDROID) STRUCT_SETMNTENT mnttab; if ((mnttab = SETMNTENT(MNTTAB, "r")) == nullptr) { return result; diff --git a/src/ioslaves/file/fdreceiver.cpp b/src/ioslaves/file/fdreceiver.cpp --- a/src/ioslaves/file/fdreceiver.cpp +++ b/src/ioslaves/file/fdreceiver.cpp @@ -19,6 +19,7 @@ ***/ #include +#include #include "sharefd_p.h" #include "fdreceiver.h" diff --git a/src/ioslaves/file/kauth/fdsender.cpp b/src/ioslaves/file/kauth/fdsender.cpp --- a/src/ioslaves/file/kauth/fdsender.cpp +++ b/src/ioslaves/file/kauth/fdsender.cpp @@ -20,6 +20,8 @@ #include "../sharefd_p.h" #include "fdsender.h" +#include +#include FdSender::FdSender(const std::string &path) : m_socketDes(-1) diff --git a/src/ioslaves/file/sharefd_p.h b/src/ioslaves/file/sharefd_p.h --- a/src/ioslaves/file/sharefd_p.h +++ b/src/ioslaves/file/sharefd_p.h @@ -22,6 +22,7 @@ #include #include #include +#include // fix SOCK_NONBLOCK for e.g. macOS #ifndef SOCK_NONBLOCK diff --git a/src/widgets/kurlcompletion.cpp b/src/widgets/kurlcompletion.cpp --- a/src/widgets/kurlcompletion.cpp +++ b/src/widgets/kurlcompletion.cpp @@ -63,6 +63,7 @@ #else #include #endif +#include static bool expandTilde(QString &); static bool expandEnv(QString &); @@ -275,6 +276,7 @@ protected: void run() Q_DECL_OVERRIDE { +#ifndef Q_OS_ANDROID static const QChar tilde = '~'; // we don't need to handle prepend here, right? ~user is always at pos 0 @@ -295,7 +297,7 @@ } #endif addMatch(QString(tilde)); - +#endif done(); } }; diff --git a/src/widgets/previewjob.cpp b/src/widgets/previewjob.cpp --- a/src/widgets/previewjob.cpp +++ b/src/widgets/previewjob.cpp @@ -22,7 +22,9 @@ #include "previewjob.h" -#ifdef Q_OS_UNIX +#define WITH_SHM defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) + +#if WITH_SHM #include #include #endif @@ -194,7 +196,7 @@ PreviewJob::~PreviewJob() { -#ifdef Q_OS_UNIX +#if WITH_SHM Q_D(PreviewJob); if (d->shmaddr) { shmdt((char *)d->shmaddr); @@ -640,7 +642,7 @@ job->addMetaData(QStringLiteral("sequence-index"), QString().setNum(sequenceIndex)); } -#ifdef Q_OS_UNIX +#if WITH_SHM if (shmid == -1) { if (shmaddr) { shmdt((char *)shmaddr); @@ -672,7 +674,7 @@ !currentItem.item.url().adjusted(QUrl::RemoveFilename).toLocalFile().startsWith(thumbRoot)) && !sequenceIndex; QImage thumb; -#ifdef Q_OS_UNIX +#if WITH_SHM if (shmaddr) { // Keep this in sync with kdebase/kioslave/thumbnail.cpp QDataStream str(data);