--- ./qtbase/src/corelib/thread/qthread_unix.cpp 2017-06-28 15:24:29.000000000 +0530 +++ ../qthread_unix.cpp 2017-07-19 20:19:40.071681378 +0530 @@ -101,7 +101,7 @@ # define SCHED_IDLE 5 #endif -#if defined(Q_OS_DARWIN) || !defined(Q_OS_ANDROID) && !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0) +#if !defined(__ANDROID__) && (defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)) #define QT_HAS_THREAD_PRIORITY_SCHEDULING #endif @@ -319,7 +319,7 @@ void *QThreadPrivate::start(void *arg) { -#if !defined(Q_OS_ANDROID) +#if !defined(__ANDROID__) pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); #endif pthread_cleanup_push(QThreadPrivate::finish, arg); @@ -369,7 +369,7 @@ #endif emit thr->started(QThread::QPrivateSignal()); -#if !defined(Q_OS_ANDROID) +#if !defined(__ANDROID__) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pthread_testcancel(); #endif @@ -666,7 +666,7 @@ void QThread::terminate() { -#if !defined(Q_OS_ANDROID) +#if !defined(__ANDROID__) Q_D(QThread); QMutexLocker locker(&d->mutex); @@ -708,7 +708,7 @@ "Current thread was not started with QThread."); Q_UNUSED(thr) -#if defined(Q_OS_ANDROID) +#if defined(__ANDROID__) Q_UNUSED(enabled); #else pthread_setcancelstate(enabled ? PTHREAD_CANCEL_ENABLE : PTHREAD_CANCEL_DISABLE, NULL);