diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 0c72bd7022..a648949d26 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -76,7 +76,7 @@ #include #endif -#if defined(Q_OS_ANDROID) +#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK) #include #endif @@ -2387,7 +2387,7 @@ typedef uint SeedStorageType; typedef QThreadStorage SeedStorage; Q_GLOBAL_STATIC(SeedStorage, randTLS) // Thread Local Storage for seed value -#elif defined(Q_OS_ANDROID) +#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK) typedef QThreadStorage AndroidRandomStorage; Q_GLOBAL_STATIC(AndroidRandomStorage, randomTLS) #endif @@ -2423,7 +2423,7 @@ void qsrand(uint seed) //global static object, fallback to srand(seed) srand(seed); } -#elif defined(Q_OS_ANDROID) +#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK) if (randomTLS->hasLocalData()) { randomTLS->localData().callMethod("setSeed", "(J)V", jlong(seed)); return; @@ -2479,7 +2479,7 @@ int qrand() //global static object, fallback to rand() return rand(); } -#elif defined(Q_OS_ANDROID) +#elif defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK) AndroidRandomStorage *randomStorage = randomTLS(); if (!randomStorage) return rand();