From e36a855c3098dda99384dd9c7d2e6c73f9d64528 Mon Sep 17 00:00:00 2001 From: "dp%netscape.com" Date: Tue, 25 Jan 2000 07:54:46 +0000 Subject: [PATCH] Getting dns daemon to compile on linux. (dont part of build yet) git-svn-id: svn://10.0.0.236/trunk@58575 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/netwerk/dns/daemon/Makefile.in | 2 +- mozilla/netwerk/dns/daemon/nsDnsAsyncLookup.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mozilla/netwerk/dns/daemon/Makefile.in b/mozilla/netwerk/dns/daemon/Makefile.in index a06146d8bcf..23cc4f3224a 100644 --- a/mozilla/netwerk/dns/daemon/Makefile.in +++ b/mozilla/netwerk/dns/daemon/Makefile.in @@ -34,5 +34,5 @@ SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=) include $(topsrcdir)/config/rules.mk -DEFINES += -D"GETHOSTBYNAME_DELAY=5" +DEFINES += -D"GETHOSTBYNAME_DELAY=5" -DNO_SOCKS_NS_KLUDGE diff --git a/mozilla/netwerk/dns/daemon/nsDnsAsyncLookup.cpp b/mozilla/netwerk/dns/daemon/nsDnsAsyncLookup.cpp index 4582fbdedbb..0bf0d2e9dd7 100644 --- a/mozilla/netwerk/dns/daemon/nsDnsAsyncLookup.cpp +++ b/mozilla/netwerk/dns/daemon/nsDnsAsyncLookup.cpp @@ -55,7 +55,7 @@ #include #include "unix_dns.h" -#if defined(AIX) +#if defined(AIX) || defined(__linux) #include // for fd_set #endif @@ -65,7 +65,10 @@ #include // for res_init() and _res #endif -#if !defined(__irix) +#if defined(__linux) +// Didn't find gettdtablehi() or gettdtablesize() on linux. Using FD_SETSIZE +#define getdtablehi() FD_SETSIZE +#elif !defined(__irix) // looks like Irix is the only one that has getdtablehi()? #define getdtablehi() getdtablesize() @@ -544,7 +547,7 @@ int main (int argc, char **argv) if (!(strncmp (buffer, "shutdown:", 9))) break; - char *name = index (buffer, ' '); + char *name = strchr ((const char *)buffer, ' '); if (name && *name) name++;