Communication with libresolv in Android NDK

I am trying to port one DNS tool to Android, which depends on libresolv (at least until I understand).

So basically it looks like Android has libresolv (after android-21) since there are at least headers. But when compiling I get a linker error

error: undefined reference to '__ns_parserr' error: undefined reference to 'p_class' error: undefined reference to 'p_type' error: undefined reference to '__ns_name_uncompress' error: undefined reference to '__ns_initparse' error: undefined reference to '__ns_msg_getflag' 

If I understood correctly ( https://en.wikipedia.org/wiki/Bionic_(software) ), all this should be in libc, but for some reason this is not the case.

Any tips?

Oh BTW, this is what I'm trying to connect

https://github.com/verisign/dnscap/blob/master/dump_dns.c

+6
source share

All Articles