From: Twaik Yont <9674930+twaik@users.noreply.github.com> On Android, pthread mutex attribute support cannot be reliably determined at configure time. The NDK may expose pthread_mutexattr_setprotocol() and PTHREAD_PRIO_INHERIT based on the selected API level, causing configure checks to succeed. However, the actual availability depends on the device’s bionic libc, and the functionality may not be implemented at runtime on the target system. In addition, robust mutex support (pthread_mutexattr_setrobust()/PTHREAD_MUTEX_ROBUST) is not provided by bionic. Relying solely on configure-time detection can therefore select a code path that builds successfully but is not guaranteed to function correctly on the running Android system. Initialize pulse_mutex without special attributes on Android and keep the existing mutex attribute setup on other platforms. Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com> --- dlls/winepulse.drv/pulse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/winepulse.drv/pulse.c b/dlls/winepulse.drv/pulse.c index 8033f0f851b..c0f29b58294 100644 --- a/dlls/winepulse.drv/pulse.c +++ b/dlls/winepulse.drv/pulse.c @@ -240,6 +240,7 @@ static int pulse_poll_func(struct pollfd *ufds, unsigned long nfds, int timeout, static NTSTATUS pulse_process_attach(void *args) { +#ifndef __ANDROID__ pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); @@ -248,6 +249,9 @@ static NTSTATUS pulse_process_attach(void *args) if (pthread_mutex_init(&pulse_mutex, &attr) != 0) pthread_mutex_init(&pulse_mutex, NULL); +#else + pthread_mutex_init(&pulse_mutex, NULL); +#endif #ifdef _WIN64 if (NtCurrentTeb()->WowTebOffset) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10067