Fix compilation error on Android.

Public issue https://github.com/mackron/miniaudio/issues/805
This commit is contained in:
David Reid
2024-01-22 07:26:38 +10:00
parent a4aa0dc404
commit 3ed9d05c38
+5 -1
View File
@@ -16169,7 +16169,11 @@ static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority
/* I'm not treating a failure of setting the priority as a critical error so not aborting on failure here. */ /* I'm not treating a failure of setting the priority as a critical error so not aborting on failure here. */
if (pthread_attr_setschedparam(&attr, &sched) == 0) { if (pthread_attr_setschedparam(&attr, &sched) == 0) {
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); #if !defined(MA_ANDROID) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 28)
{
pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
}
#endif
} }
} }
} }