summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-04-26 16:03:55 +0000
committerOlivier Blin <oblin@mandriva.org>2005-04-26 16:03:55 +0000
commit26c10af9e2e87e7892dce677f6b38511545a370b (patch)
treeb02328fb8c95a2b881ea728f74d8c29c6b21c3db
parent9662ef7a3143d341483baa7cbd1d0117776b3fc6 (diff)
downloaddrakx-26c10af9e2e87e7892dce677f6b38511545a370b.tar
drakx-26c10af9e2e87e7892dce677f6b38511545a370b.tar.gz
drakx-26c10af9e2e87e7892dce677f6b38511545a370b.tar.bz2
drakx-26c10af9e2e87e7892dce677f6b38511545a370b.tar.xz
drakx-26c10af9e2e87e7892dce677f6b38511545a370b.zip
fix dns resolution for DSL connections
-rw-r--r--mdk-stage1/dns.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdk-stage1/dns.c b/mdk-stage1/dns.c
index 7a386fad1..1d7d2d6c8 100644
--- a/mdk-stage1/dns.c
+++ b/mdk-stage1/dns.c
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <netdb.h>
#include <sys/socket.h>
+#include <resolv.h>
#include "network.h"
#include "log.h"
@@ -41,7 +42,7 @@ int mygethostbyname(char * name, struct in_addr * addr)
struct hostent * h;
/* prevent from timeouts */
- if (dns_server.s_addr == 0)
+ if (_res.nscount == 0)
return -1;
h = gethostbyname(name);
@@ -69,7 +70,7 @@ char * mygethostbyaddr(char * ipnum)
struct hostent * host;
/* prevent from timeouts */
- if (dns_server.s_addr == 0)
+ if (_res.nscount == 0)
return NULL;
if (!inet_aton(ipnum, &in))