packages/net/mtr/patches/502-fix-res_ninit.patch
acoul 5f4dc2b243 net/mtr: update to mtr-0.79 & fix compile issues
git-svn-id: svn://svn.openwrt.org/openwrt/packages@22014 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-07-01 13:44:00 +00:00

46 lines
1.2 KiB
Diff

--- a/dns.c
+++ b/dns.c
@@ -309,17 +309,17 @@ char nullstring[] = "";
int use_dns = 1;
-#ifdef res_ninit
-#define RES_INIT() res_ninit(&myres);
-#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \
- res_nmkquery(&myres, a, b, c, d, e, f, g, h, i)
-struct __res_state myres;
-#else
+//#ifdef res_ninit
+//#define RES_INIT() res_ninit(&myres);
+//#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \
+// res_nmkquery(&myres, a, b, c, d, e, f, g, h, i)
+//struct __res_state myres;
+//#else
#define RES_INIT() res_init();
#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \
res_mkquery(a, b, c, d, e, f, g, h, i)
#define myres _res
-#endif
+//#endif
/* Code */
#ifdef CorruptCheck
@@ -1274,7 +1274,7 @@ res_nmkquery(res_state statp,
#if 0
hp->id = htons(++statp->id);
#else
- hp->id = htons(statp->id);
+// hp->id = htons(statp->id);
int randombits;
do
{
@@ -1287,7 +1287,7 @@ res_nmkquery(res_state statp,
#endif
}
while ((randombits & 0xffff) == 0);
- statp->id = (statp->id + randombits) & 0xffff;
+// statp->id = (statp->id + randombits) & 0xffff;
#endif
hp->opcode = op;
hp->rd = (statp->options & RES_RECURSE) != 0;