From: Roger Wolff Date: Fri, 15 Aug 2014 09:42:39 +0000 (+0200) Subject: modified hloeung's glibc test X-Git-Tag: v0.86~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff22833854960be90648666e7fab22b6f9bdd616;p=thirdparty%2Fmtr.git modified hloeung's glibc test --- diff --git a/dns.c b/dns.c index 488b627..c5c3c1a 100644 --- a/dns.c +++ b/dns.c @@ -56,15 +56,22 @@ #include "net.h" #ifdef ENABLE_IPV6 -#ifdef __GLIBC__ + +// 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__ #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