badvpn
badvpn copied to clipboard
use of undeclared identifier '_res'
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));
_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.