Re: [PATCH v6 0/6] MR9977: wineandroid: Fix build issues and early runtime regressions on modern Android toolchains
On Thu Feb 5 07:05:30 2026 +0000, Alexandre Julliard wrote:
I merged most of these, the remaining ones will need some more thought. Thanks for looking at these patches.
About the remaining commits: 1) `ntdll: Include <strings.h> for ffs() declaration` This change should be harmless. ffs() is already implicitly pulled in through other headers, which is why this issue usually does not surface. However, with stricter C99+ toolchains (e.g. clang used in Termux / Android environments), implicit function declarations are rejected and this results in build failures like: ``` /home/twaik/.termux-build/wine-stable/src/dlls/ntdll/unix/unix_private.h:660:26: error: call to undeclared function 'ffs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 660 | idx = idx * 32 + ffs( ~ldt_bitmap[idx] ) - 1; | ^ 1 error generated. make: *** [Makefile:250029: dlls/ntdll/unix/loadorder.o] Error 1 ``` Including <strings.h> only makes the dependency explicit and does not change behavior on platforms where it was already indirectly included. --- 2) `winepulse: Do not use pthread mutex attributes on Android` This change is Android-only and does not affect other platforms. Android only provides pthread_mutexattr_setprotocol() starting from API 28 and does not support robust mutexes at all. Attempting to use these attributes prevents winepulse from building in Android environments. Falling back to a default mutex on Android keeps existing behavior elsewhere unchanged. This is particularly useful for downstream Android-based projects (compiling Wine with Android NDK: Termux, Winlator-bionic, MiceWine, etc.) which rely on PulseAudio for sound output and currently have no alternative backend. --- 3) `wineandroid: force --rosegment for wine-preloader` This change is inside the Android-specific configure section and should not affect other platforms. Without --rosegment the linker may generate a wine-preloader ELF roughly 2GB in size due to segment layout. The patch only appends the flag to WINEPRELOADER_LDFLAGS and only when the toolchain supports it, so it should be safe and fully isolated to Android builds. --- Should I make separate merge request for these changes? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9977#note_128846
participants (1)
-
Twaik Yont (@twaik)