diff options
author | Duane Hughes <duanejevon@gmail.com> | 2010-12-06 07:22:40 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-12-06 15:48:16 +0000 |
commit | a30088cd2aef91d15628678e307e8682529c2df9 (patch) | |
tree | a0ddd69555736f34872b6035d6183f00b7b03f49 /main/zabbix/zabbix-dn_skipname.patch | |
parent | 0b9cf0748b5f8df6561e1863c93150e9c260bbb0 (diff) | |
download | aports-a30088cd2aef91d15628678e307e8682529c2df9.tar.bz2 aports-a30088cd2aef91d15628678e307e8682529c2df9.tar.xz |
main/zabbix: moved from testing
fixes #251
Diffstat (limited to 'main/zabbix/zabbix-dn_skipname.patch')
-rw-r--r-- | main/zabbix/zabbix-dn_skipname.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/main/zabbix/zabbix-dn_skipname.patch b/main/zabbix/zabbix-dn_skipname.patch new file mode 100644 index 0000000000..df75e914a1 --- /dev/null +++ b/main/zabbix/zabbix-dn_skipname.patch @@ -0,0 +1,44 @@ +diff --git a/src/libs/zbxsysinfo/common/net.c b/src/libs/zbxsysinfo/common/net.c +index c8956a6..645fd8c 100644 +--- a/src/libs/zbxsysinfo/common/net.c ++++ b/src/libs/zbxsysinfo/common/net.c +@@ -26,6 +26,39 @@ + + #include "net.h" + ++#if defined(__UCLIBC__) && defined(HAVE_RES_QUERY) ++/* ++ * Skip over a compressed domain name. Return the size or -1. ++ */ ++int ++__dn_skipname(const u_char *comp_dn, const u_char *eom) ++{ ++ const u_char *cp; ++ int n; ++ ++ cp = comp_dn; ++ while (cp < eom && (n = *cp++)) { ++ /* ++ * check for indirection ++ */ ++ switch (n & INDIR_MASK) { ++ case 0: /* normal case, n == len */ ++ cp += n; ++ continue; ++ case INDIR_MASK: /* indirection */ ++ cp++; ++ break; ++ default: /* illegal type */ ++ return (-1); ++ } ++ break; ++ } ++ if (cp > eom) ++ return (-1); ++ return (cp - comp_dn); ++} ++#endif ++ + /* + * 0 - NOT OK + * 1 - OK |