piscisaureus/cares — pull request #4 by pyokagan (2014-05-15 16:16:22+00:00)
Title: android: disable getservbyport_r

Hi, compiling c-ares with the Android NDK throws an error during linking stage with `-Wl,--no-undefined`. Seems that `getservbyport_r` is not in `libc.so`'s symbol table at all. A quick grep of bionic's git repo also does not seem to turn up any reference to this function.

Disables `getservbyport_r` by undefining `GETSERVBYPORT_R_ARGS`,
`GETSERVBYPORT_R_BUFSIZE` and `HAVE_GETSERVBYPORT_R` on android's
`ares_config.h`.

Android NDK does not have `getservbyport_r` defined in `netdb.h` or the
symbol table of `libc.so`. Having it enabled would cause an implicit
declaration of `getservbyport_r`, which may lead to linker errors.