|
|
@@ -0,0 +1,27 @@
|
|
|
+--- dnstracer.c.dist 2003-06-12 21:01:02.000000000 +0200
|
|
|
++++ dnstracer.c 2003-06-12 21:10:38.000000000 +0200
|
|
|
+@@ -1246,7 +1246,11 @@
|
|
|
+ struct hostent *h;
|
|
|
+ char **addr_list=NULL;
|
|
|
+
|
|
|
++#if defined(HAVE_GETHOSTBYNAME2)
|
|
|
+ h=gethostbyname2(nextserver_name,ip==0?AF_INET:AF_INET6);
|
|
|
++#else
|
|
|
++ h=gethostbyname(nextserver_name);
|
|
|
++#endif
|
|
|
+ if (h==NULL) continue;
|
|
|
+
|
|
|
+ //
|
|
|
+@@ -1480,8 +1484,12 @@
|
|
|
+
|
|
|
+ {
|
|
|
+ struct hostent *h;
|
|
|
++#if defined(HAVE_GETHOSTBYNAME2)
|
|
|
+ if (((h=gethostbyname2(server_name,AF_INET6))==NULL) &&
|
|
|
+ ((h=gethostbyname2(server_name,AF_INET))==NULL)) {
|
|
|
++#else
|
|
|
++ if ((h=gethostbyname(server_name))==NULL) {
|
|
|
++#endif
|
|
|
+ fprintf(stderr,"Cannot find IP address for %s\n",server_name);
|
|
|
+ return 1;
|
|
|
+ }
|