Skip to content

fix(compat.hev-lwip): propagate FD_SET_DEFINED for Android NDK and add ios sources - #983

Open
FarnaHerry wants to merge 1 commit into
mcpplibs:mainfrom
FarnaHerry:fix/compat-hev-lwip-android
Open

FarnaHerry wants to merge 1 commit into
mcpplibs:mainfrom
FarnaHerry:fix/compat-hev-lwip-android

Conversation

@FarnaHerry

Copy link
Copy Markdown
Collaborator

Summary

  • Fix Android NDK (aarch64-linux-android / x86_64-linux-android, NDK r30 / API 21+) compilation failure in compat.hev-lwip@2.2.1.12 (src/ports/unix/include/cc.h:71:25: error: typedef redefinition with different types ('__kernel_fd_set' vs 'struct fd_set')).
  • Add features = { ["default"] = { implies = { "android-fd-set" } }, ["android-fd-set"] = { defines = { "FD_SET_DEFINED" } } } so -DFD_SET_DEFINED propagates to both compat.hev-lwip C translation units and downstream consumer translation units including <lwip/...> headers (because default's own defines are inert in mcpp, matching the pattern in compat.ngtcp2 and compat.curl).
  • Outside Android (LWIP_UNIX_ANDROID undefined), FD_SET_DEFINED is completely a no-op.
  • Also add ios = { sources = { "*/src/ports/unix/lib/sys_arch.c" } } to ensure sys_arch.c is covered if ios is resolved separately from macosx.

Verification

  • mcpp xpkg parse pkgs/c/compat.hev-lwip.lua & --all-os pass on both CI-pinned mcpp 2026.11.23.1 and local mcpp 2026.11.27.1.
  • Repo lint scripts (lua tests/check_*.lua, python3 tools/platform_rows.py check) pass.
  • mcpp test -p hev-lwip (x86_64-unknown-linux-gnu) passes (1 passed; 0 failed).
  • mcpp test -p hev-lwip --target aarch64-linux-android --no-run and mcpp build -p hev-lwip --release --target aarch64-linux-android succeed with NDK 30.0.16248370.
  • Standalone consumer (#include <sys/select.h>, <lwip/init.h>, <lwip/netif.h>, <lwip/tcp.h>, <lwip/udp.h>) builds cleanly with mcpp build --release --cache=off on aarch64-linux-android, x86_64-linux-android, and x86_64-linux-musl. (iOS build not run locally due to missing iphoneos SDK on Linux.)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant