This series addresses several Android-specific build failures and toolchain interactions observed when building Wine with recent Android NDK versions. Some of these changes were previously proposed but not accepted due to insufficient explanation of the underlying behavior. This submission reintroduces those fixes with more detailed technical justification and adds a few additional related corrections discovered during further testing. The changes include: - Disable IPX detection on Android. The NDK exposes `<linux/ipx.h>` and `SOL_IPX` via UAPI headers, which causes `HAS_IPX` to be enabled at build time. In practice, bionic does not provide documented or implemented IPX socket support, and typical Android kernels ship without IPX enabled. Guard the detection with `!__ANDROID__` to avoid enabling a non-functional code path based solely on header-level defines. - Replace `ffs()` with `__builtin_ffs()` in ntdll. Android builds fail due to ffs() being used without `<strings.h>`, which Wine does not include. Using `__builtin_ffs()` avoids implicit declaration errors under C99 and matches existing usage elsewhere in the tree while preserving semantics. - Avoid pthread mutex attributes in winepulse on Android. `pthread_mutexattr_setprotocol()` may be exposed at configure time depending on the selected API level, but actual availability depends on the device's bionic libc. Robust mutex support is not provided by bionic. Configure-time detection can therefore select a code path that is not reliably supported at runtime. Use plain `pthread_mutex_init()` on Android and retain the existing attribute-based initialization on other platforms. - Force `--rosegment` for `wine-preloader` on Android (API < 29, NDK r22+). Since NDK r22, clang implicitly passes `-Wl,--no-rosegment` when targeting API levels below 29 ([NDK changelog](https://github.com/android/ndk/wiki/Changelog-r22) Issue 1196). Because wine-preloader links with `-Wl,-Ttext=0x7d400000`, this results in a `PT_LOAD` segment with a very large file offset to preserve the VMA-to-file-offset relationship, creating a sparse gap (`~0x7d400000`) and inflating the apparent ELF size to `~2GB`. `wine-preloader` is a static binary and does not depend on unwind/backtrace correctness, so inheriting `--no-rosegment` provides no benefit. Force `-Wl,--rosegment` when supported to keep the segment layout reasonable, without affecting other binaries. - Emit ARM-specific ELF directive syntax in winebuild. GNU as requires `%function` / `%progbits` for `.type` and `.section` on ARM, whereas most other ELF architectures use `@function` / `@progbits`. Adjust winebuild output when targeting `CPU_ARM` to avoid assembler errors (including with clang's integrated assembler). Overall, this series improves Android NDK compatibility, prevents false feature detection based on header exposure or API-level-dependent behavior, and fixes ARM assembler incompatibilities, while keeping the changes restricted to Android-specific paths. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10067