]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
modified hloeung's glibc test
authorRoger Wolff <R.E.Wolff@BitWizard.nl>
Fri, 15 Aug 2014 09:42:39 +0000 (11:42 +0200)
committerRoger Wolff <R.E.Wolff@BitWizard.nl>
Fri, 15 Aug 2014 09:42:39 +0000 (11:42 +0200)
dns.c

diff --git a/dns.c b/dns.c
index 488b62765b0047feb706484ae36875db9cb95b24..c5c3c1af70790fd7af4ae91423acd82253ad79a3 100644 (file)
--- a/dns.c
+++ b/dns.c
 #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