Rosen Penev:
> 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(-)
Nice try. Here is why I reject this patch.
1) Postfix calls dns_res_query() when res_query() would not provide
the correct result.
2) You are adding code that makes dns_res_query() call res_query().
That is not right, that is not even wrong. It is just silly.
And here is what I will accept.
I will accept a patch that disables the dns_res_query() function
and that replaces the dns_res_query() call with a warning that the
dns_ncache_ttl_fix_enable feature is not supported.
Wietse
> 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
>
>