Nim's posix module uses the correct POSIX signature for gethostbyaddr that accepts const void * as the first argument.
const void *
Up until API level 19 (Android 4.x), Android used a different signature that accepts const char * as the first argument, and int as the second (instead of socklen_t). This makes Nim networking code not compile for Android when targeting version 4.x or newer (the reasonable version to target as about 50% of Android devices today are 4.x).
const char *
Is there any clean way to resolve this? I'd note that newer versions of their API use POSIX-compliant signature, but it's only compatible with Android 5.0 or newer.
I guess the best way would be to add a ``android4_support` (or similar) define.
Added 'android4' define support that declares a different gethostbyad…
…dr. Fixes #4376