Skip to content

Compile fail for Android #124

@TheMode

Description

@TheMode

Followed https://github.com/libsdl-org/SDL/blob/main/docs/README-android.md#building-a-more-complex-app and ran ./gradlew installDebug

error: call to undeclared function 'getifaddrs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  706 |     if (getifaddrs(&ifaddr) == -1) {
      |         ^
error: call to undeclared function 'freeifaddrs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  720 |             freeifaddrs(ifaddr);
      |             ^
error: call to undeclared function 'freeifaddrs'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  743 |         freeifaddrs(ifaddr);
      |         ^

This is caused by SDL android-project API being lower than 24: https://stackoverflow.com/a/57112520/10257133

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions