xtables-addons: FreeBSD build fix
[feed/packages.git] / admin / zabbix / patches / 120-uclibc-res.patch
1 --- a/src/libs/zbxsysinfo/common/net.c
2 +++ b/src/libs/zbxsysinfo/common/net.c
3 @@ -547,7 +547,7 @@ static int dns_query(AGENT_REQUEST *request, AGENT_RESULT *result, int short_ans
4 return SYSINFO_RET_FAIL;
5 }
6
7 -#if defined(HAVE_RES_NINIT) && !defined(_AIX)
8 +#if defined(HAVE_RES_NINIT) && !defined(_AIX) && !defined(__UCLIBC__)
9 if (-1 == (res = res_nmkquery(&res_state_local, QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf))))
10 #else
11 if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf))))
12 @@ -643,7 +643,11 @@ static int dns_query(AGENT_REQUEST *request, AGENT_RESULT *result, int short_ans
13 res_state_local.retrans = retrans;
14 res_state_local.retry = retry;
15
16 +#ifndef __UCLIBC__
17 res = res_nsend(&res_state_local, buf, res, answer.buffer, sizeof(answer.buffer));
18 +#else
19 + res = res_search(*res_state_local.dnsrch, res, 0, answer.buffer, sizeof(answer.buffer));
20 +#endif
21
22 # ifdef HAVE_RES_U_EXT /* Linux */
23 if (NULL != ip && '\0' != *ip && AF_INET6 == ip_type)