From: Haw Loeung Date: Fri, 15 Aug 2014 23:32:34 +0000 (+1000) Subject: Revert "modified hloeung's glibc test" X-Git-Tag: v0.86~4^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff6aa62f9e582a293ba17341c1bf6e8805506bab;p=thirdparty%2Fmtr.git Revert "modified hloeung's glibc test" This reverts commit ff22833854960be90648666e7fab22b6f9bdd616. --- diff --git a/dns.c b/dns.c index c5c3c1a..488b627 100644 --- a/dns.c +++ b/dns.c @@ -56,22 +56,15 @@ #include "net.h" #ifdef ENABLE_IPV6 - -// hloeung suggested testing for glibc here. -// -// Testing: The "touching" of the internals of "myres" was not-portable -// anyway. Apparently the implementation of res_init and family is very -// consistent, so that it usually works. Lets hope this also goes for the -// IPV6 fields. -- REW -//#ifdef __GLIBC__ +#ifdef __GLIBC__ #define NSCOUNT (myres.nscount + myres._u._ext.nscount6) #define NSCOUNT6 myres._u._ext.nscount6 #define NSSOCKADDR6(i) (myres._u._ext.nsaddrs[i]) -//#else -//#define NSCOUNT myres.nscount -//#define NSCOUNT6 myres.nscount -//#define NSSOCKADDR6(i) (&(myres._u._ext.ext->nsaddrs[i].sin6)) -//#endif +#else +#define NSCOUNT myres.nscount +#define NSCOUNT6 myres.nscount +#define NSSOCKADDR6(i) (&(myres._u._ext.ext->nsaddrs[i].sin6)) +#endif #endif