aboutsummaryrefslogtreecommitdiffstats
path: root/main/zabbix/res_send.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/zabbix/res_send.patch')
-rw-r--r--main/zabbix/res_send.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/main/zabbix/res_send.patch b/main/zabbix/res_send.patch
new file mode 100644
index 0000000000..6e0592a2a4
--- /dev/null
+++ b/main/zabbix/res_send.patch
@@ -0,0 +1,41 @@
+Index: src/libs/zbxsysinfo/common/net.c
+===================================================================
+--- ./src/libs/zbxsysinfo/common/net.c (revision 28283)
++++ ./src/libs/zbxsysinfo/common/net.c (working copy)
+@@ -418,6 +418,7 @@
+ #else /* not _WINDOWS */
+ res_init(); /* initialize always, settings might have changed */
+
++#if defined(HAVE_RES_MKQUERY) && defined(HAVE_RES_SEND)
+ if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf))))
+ return SYSINFO_RET_FAIL;
+
+@@ -436,7 +437,12 @@
+ _res.retry = retry;
+
+ res = res_send(buf, res, answer.buffer, sizeof(answer.buffer));
+-
++#else /* defined(HAVE_RES_QUERY) && defined(HAVE_RES_SEND) */
++ /* retrand and retry are ignored */
++ if (-1 == (res = res_query(zone, C_IN, type, answer.buffer, sizeof(answer.buffer))))
++ return SYSINFO_RET_FAIL;
++#endif
++
+ hp = (HEADER *)answer.buffer;
+
+ if (1 == short_answer)
+Index: configure.in
+===================================================================
+--- ./configure.in (revision 28283)
++++ ./configure.in (working copy)
+@@ -149,6 +149,10 @@
+ AC_MSG_ERROR([Unable to DNS lookup functions "${found_resolv}"])
+ fi
+ LIBS="${LIBS} ${RESOLV_LIBS}"
++AC_SEARCH_LIBS([res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])])
++AC_SEARCH_LIBS([__res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])])
++AC_SEARCH_LIBS([res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])])
++AC_SEARCH_LIBS([__res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])])
+
+ dnl *****************************************************************
+ dnl * *