uClibc-ng does not have res_send or res_nsend. --- v2: Took an approach from a different patchset that solves the same issue src/dns/dns_lookup.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/dns/dns_lookup.c b/src/dns/dns_lookup.c index 1ea98b3..18073b4 100644 --- a/src/dns/dns_lookup.c +++ b/src/dns/dns_lookup.c @@ -311,9 +311,17 @@ typedef struct DNS_REPLY { static int dns_res_query(const char *name, int class, int type, unsigned char *answer, int anslen) { + int len; +#ifndef __UCLIBC__ + len = res_query(name, class, type, answer, anslen); + if(len < 0) + SET_H_ERRNO(HOST_NOT_FOUND); + else + SET_H_ERRNO(0); + return len; +#else unsigned char msg_buf[MAX_DNS_QUERY_SIZE]; HEADER *reply_header = (HEADER *) answer; - int len; /* * Differences with res_query() from libbind: @@ -369,6 +377,7 @@ static int dns_res_query(const char *name, int class, int type, } return (len); } +#endif } /* dns_res_search - res_search() that can return negative replies */ -- 2.17.1