badvpn icon indicating copy to clipboard operation
badvpn copied to clipboard

use of undeclared identifier '_res'

Open cvillarongace opened this issue 6 years ago • 1 comments

I'm getting an error of "use of undeclared identifier '_res'" using ndk-build for udpgw command build. Any Idea?

jni/udpgw/udpgw.c:1454:9: error: use of undeclared identifier '_res' if (_res.nscount == 0) { ^ jni/udpgw/udpgw.c:1460:27: error: use of undeclared identifier '_res' BAddr_InitIPv4(&addr, _res.nsaddr_list[0].sin_addr.s_addr, hton16(53));

cvillarongace avatar Apr 22 '19 14:04 cvillarongace

_res should be defined in <resolv.h>, it is part of the resolver API (man res_init). I don't know why it's not getting defined in your case. If you don't need the feature of udpgw to atomatically figure out the DNS server IP, you can comment out the code in maybe_update_dns.

ambrop72 avatar Apr 23 '19 11:04 ambrop72