diff -urN ircd-hybrid-5.3p8.orig/include/local_resolv.h ircd-hybrid-5.3p8/include/local_resolv.h
--- ircd-hybrid-5.3p8.orig/include/local_resolv.h	1969-12-31 19:00:00.000000000 -0500
+++ ircd-hybrid-5.3p8/include/local_resolv.h	2004-01-23 16:14:09.000000000 -0500
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that: (1) source distributions retain this entire copyright
+ * notice and comment, and (2) distributions including binaries display
+ * the following acknowledgement:  ``This product includes software
+ * developed by the University of California, Berkeley and its contributors''
+ * in the documentation or other materials provided with the distribution
+ * and in all advertising materials mentioning features or use of this
+ * software. Neither the name of the University nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *	@(#)resolv.h	5.10.1 (Berkeley) 6/1/90
+ */
+
+/*
+ * Resolver configuration file.
+ * Normally not present, but may contain the address of the
+ * inital name server(s) to query and the domain search list.
+ */
+#ifdef LOCAL_LIBRESOLV
+
+#ifndef	_PATH_RESCONF
+#define _PATH_RESCONF        "/etc/resolv.conf"
+#endif
+
+/*
+ * Global defines and variables for resolver stub.
+ */
+#define	MAXNS		3		/* max # name servers we'll track */
+#define	MAXDFLSRCH	3		/* # default domain levels to try */
+#define	MAXDNSRCH	6		/* max # domains in search path */
+#define	LOCALDOMAINPARTS 2		/* min levels in name that is "local" */
+#define MAXSERVICES	2		/* max # of services to search */
+
+#define	RES_TIMEOUT	5		/* min. seconds between retries */
+
+struct state {
+	int	retrans;	 	/* retransmition time interval */
+	int	retry;			/* number of times to retransmit */
+	long	options;		/* option flags - see below. */
+	int	nscount;		/* number of name servers */
+	struct	sockaddr_in nsaddr_list[MAXNS];	/* address of name server */
+#define	nsaddr	nsaddr_list[0]		/* for backward compatibility */
+	unsigned short	id;			/* current packet id */
+	char	defdname[MAXDNAME];	/* default domain */
+	char	*dnsrch[MAXDNSRCH+1];	/* components of domain to search */
+	unsigned short	order[MAXSERVICES+1];	/* search service order */
+};
+
+#define RES_SERVICE_NONE	0
+#define RES_SERVICE_BIND	1
+#define RES_SERVICE_LOCAL	2
+
+/*
+ * Resolver options
+ */
+#define RES_INIT	0x0001		/* address initialized */
+#define RES_DEBUG	0x0002		/* print debug messages */
+#define RES_AAONLY	0x0004		/* authoritative answers only */
+#define RES_USEVC	0x0008		/* use virtual circuit */
+#define RES_PRIMARY	0x0010		/* query primary server only */
+#define RES_IGNTC	0x0020		/* ignore trucation errors */
+#define RES_RECURSE	0x0040		/* recursion desired */
+#define RES_DEFNAMES	0x0080		/* use default domain name */
+#define RES_STAYOPEN	0x0100		/* Keep TCP socket open */
+#define RES_DNSRCH	0x0200		/* search up local domain tree */
+
+#define RES_DEFAULT	(RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
+
+extern struct state _res;
+extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
+extern int	res_init();
+
+#endif
diff -urN ircd-hybrid-5.3p8.orig/include/resolv.h ircd-hybrid-5.3p8/include/resolv.h
--- ircd-hybrid-5.3p8.orig/include/resolv.h	1997-09-29 11:35:23.000000000 -0400
+++ ircd-hybrid-5.3p8/include/resolv.h	1969-12-31 19:00:00.000000000 -0500
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that: (1) source distributions retain this entire copyright
- * notice and comment, and (2) distributions including binaries display
- * the following acknowledgement:  ``This product includes software
- * developed by the University of California, Berkeley and its contributors''
- * in the documentation or other materials provided with the distribution
- * and in all advertising materials mentioning features or use of this
- * software. Neither the name of the University nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- *	@(#)resolv.h	5.10.1 (Berkeley) 6/1/90
- */
-
-/*
- * Resolver configuration file.
- * Normally not present, but may contain the address of the
- * inital name server(s) to query and the domain search list.
- */
-
-#ifndef	_PATH_RESCONF
-#define _PATH_RESCONF        "/etc/resolv.conf"
-#endif
-
-/*
- * Global defines and variables for resolver stub.
- */
-#define	MAXNS		3		/* max # name servers we'll track */
-#define	MAXDFLSRCH	3		/* # default domain levels to try */
-#define	MAXDNSRCH	6		/* max # domains in search path */
-#define	LOCALDOMAINPARTS 2		/* min levels in name that is "local" */
-#define MAXSERVICES	2		/* max # of services to search */
-
-#define	RES_TIMEOUT	5		/* min. seconds between retries */
-
-struct state {
-	int	retrans;	 	/* retransmition time interval */
-	int	retry;			/* number of times to retransmit */
-	long	options;		/* option flags - see below. */
-	int	nscount;		/* number of name servers */
-	struct	sockaddr_in nsaddr_list[MAXNS];	/* address of name server */
-#define	nsaddr	nsaddr_list[0]		/* for backward compatibility */
-	unsigned short	id;			/* current packet id */
-	char	defdname[MAXDNAME];	/* default domain */
-	char	*dnsrch[MAXDNSRCH+1];	/* components of domain to search */
-	unsigned short	order[MAXSERVICES+1];	/* search service order */
-};
-
-#define RES_SERVICE_NONE	0
-#define RES_SERVICE_BIND	1
-#define RES_SERVICE_LOCAL	2
-
-/*
- * Resolver options
- */
-#define RES_INIT	0x0001		/* address initialized */
-#define RES_DEBUG	0x0002		/* print debug messages */
-#define RES_AAONLY	0x0004		/* authoritative answers only */
-#define RES_USEVC	0x0008		/* use virtual circuit */
-#define RES_PRIMARY	0x0010		/* query primary server only */
-#define RES_IGNTC	0x0020		/* ignore trucation errors */
-#define RES_RECURSE	0x0040		/* recursion desired */
-#define RES_DEFNAMES	0x0080		/* use default domain name */
-#define RES_STAYOPEN	0x0100		/* Keep TCP socket open */
-#define RES_DNSRCH	0x0200		/* search up local domain tree */
-
-#define RES_DEFAULT	(RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
-
-extern struct state _res;
-extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
-extern int	res_init();
-
diff -urN ircd-hybrid-5.3p8.orig/src/inet_addr.c ircd-hybrid-5.3p8/src/inet_addr.c
--- ircd-hybrid-5.3p8.orig/src/inet_addr.c	1997-09-29 11:35:26.000000000 -0400
+++ ircd-hybrid-5.3p8/src/inet_addr.c	2004-01-23 16:17:39.000000000 -0500
@@ -57,8 +57,12 @@
 #include "common.h"
 #include "sys.h"
 #include <netinet/in.h>
+#ifdef LOCAL_RESOLV
 #include "nameser.h"
-#include "resolv.h"
+#include "local_resolv.h"
+#else
+#include <resolv.h>
+#endif
 
 #ifndef	INADDR_NONE
 #define	INADDR_NONE	((u_long)0xffffffff)
diff -urN ircd-hybrid-5.3p8.orig/src/Makefile.in ircd-hybrid-5.3p8/src/Makefile.in
--- ircd-hybrid-5.3p8.orig/src/Makefile.in	1998-01-07 19:10:30.000000000 -0500
+++ ircd-hybrid-5.3p8/src/Makefile.in	2004-01-23 16:16:53.000000000 -0500
@@ -11,7 +11,7 @@
 RES_SRC =
 
 #This is only for very old systems that NEED this
-#RES_SRC = res_mkquery.c res_init.c res_comp.c
+#RES_SRC = res_mkquery.c res_init.c res_comp.c -DLOCAL_LIBRESOLV
 
 SOURCES = $(SRC_1) $(SRC_2) $(SRC_3) $(SRC_4) $(SRC_5) $(RES_SRC)
 OBJECTS = $(SOURCES:.c=.o) version.o
@@ -77,7 +77,7 @@
 inet_addr.o: inet_addr.c ../include/setup.h ../include/struct.h \
  ../include/config.h ../include/defs.h ../include/hash.h \
  ../include/class.h ../include/dbuf.h ../include/common.h \
- ../include/sys.h ../include/nameser.h ../include/resolv.h
+ ../include/sys.h ../include/nameser.h ../include/local_resolv.h
 ircd.o: ircd.c ../include/struct.h ../include/config.h \
  ../include/setup.h ../include/defs.h ../include/hash.h \
  ../include/class.h ../include/dbuf.h ../include/common.h \
@@ -108,7 +108,7 @@
  ../include/class.h ../include/dbuf.h ../include/common.h \
  ../include/sys.h ../include/res.h ../include/numeric.h ../include/h.h \
  ../include/dich_conf.h ../include/fdlist.h ../include/nameser.h \
- ../include/resolv.h
+ ../include/local_resolv.h
 s_auth.o: s_auth.c ../include/struct.h ../include/config.h \
  ../include/setup.h ../include/defs.h ../include/hash.h \
  ../include/class.h ../include/dbuf.h ../include/common.h \
@@ -120,7 +120,7 @@
  ../include/class.h ../include/dbuf.h ../include/common.h \
  ../include/sys.h ../include/res.h ../include/numeric.h \
  ../include/patchlevel.h ../include/inet.h ../include/nameser.h \
- ../include/resolv.h ../include/h.h ../include/dich_conf.h \
+ ../include/local_resolv.h ../include/h.h ../include/dich_conf.h \
  ../include/fdlist.h
 s_conf.o: s_conf.c ../include/struct.h ../include/config.h \
  ../include/setup.h ../include/defs.h ../include/hash.h \
diff -urN ircd-hybrid-5.3p8.orig/src/res.c ircd-hybrid-5.3p8/src/res.c
--- ircd-hybrid-5.3p8.orig/src/res.c	2000-07-19 22:09:26.000000000 -0400
+++ ircd-hybrid-5.3p8/src/res.c	2004-01-23 16:18:29.000000000 -0500
@@ -14,8 +14,12 @@
 #include <signal.h>
 #include <sys/time.h>
 #include <sys/socket.h>
+#ifdef LOCAL_RESOLV
 #include "nameser.h"
-#include "resolv.h"
+#include "local_resolv.h"
+#else
+#include <resolv.h>
+#endif
 #include "inet.h"
 
 #ifndef lint
@@ -27,10 +31,12 @@
 extern  void    debug();
 
 
+#ifdef LOCAL_LIBRESOLV
 extern	int	dn_expand (char *, char *, char *, char *, int);
 extern	int	dn_skipname (char *, char *);
 extern	int	res_mkquery (int, char *, int, int, char *, int,
 				   struct rrec *, char *, int);
+#endif
 
 extern	int	errno, h_errno;
 extern	int	highest_fd;
diff -urN ircd-hybrid-5.3p8.orig/src/res_init.c ircd-hybrid-5.3p8/src/res_init.c
--- ircd-hybrid-5.3p8.orig/src/res_init.c	1997-09-29 11:35:27.000000000 -0400
+++ ircd-hybrid-5.3p8/src/res_init.c	2004-01-23 16:13:17.000000000 -0500
@@ -31,7 +31,7 @@
 #include "config.h"	/* To get #define SOL20		Vesa */
 #include "sys.h"
 #include "nameser.h"
-#include "resolv.h"
+#include "local_resolv.h"
 
 /*
  * Resolver state default settings
diff -urN ircd-hybrid-5.3p8.orig/src/res_mkquery.c ircd-hybrid-5.3p8/src/res_mkquery.c
--- ircd-hybrid-5.3p8.orig/src/res_mkquery.c	1997-09-29 11:35:27.000000000 -0400
+++ ircd-hybrid-5.3p8/src/res_mkquery.c	2004-01-23 16:15:39.000000000 -0500
@@ -30,7 +30,11 @@
 #include "config.h"
 #include "sys.h"
 #include "nameser.h"
-#include "resolv.h"
+#ifdef LOCAL_RESOLV
+#include "local_resolv.h"
+#else
+#include <resolv.h>
+#endif
 
 /*
  * Form all types of queries.
diff -urN ircd-hybrid-5.3p8.orig/src/s_bsd.c ircd-hybrid-5.3p8/src/s_bsd.c
--- ircd-hybrid-5.3p8.orig/src/s_bsd.c	2000-07-19 22:09:27.000000000 -0400
+++ ircd-hybrid-5.3p8/src/s_bsd.c	2004-01-23 16:18:47.000000000 -0500
@@ -60,9 +60,13 @@
 # include <time.h>
 # include <arpa/nameser.h>
 #else
-# include "nameser.h"
 #endif
-#include "resolv.h"
+#ifdef LOCAL_RESOLV
+#include "nameser.h"
+#include "local_resolv.h"
+#else
+#include <resolv.h>
+#endif
 /*
 #include "sock.h"*/	/* If FD_ZERO isn't define up to this point,  */
 			/* define it (BSD4.2 needs this) */
diff -urN ircd-hybrid-5.3p8.orig/src/s_misc.c ircd-hybrid-5.3p8/src/s_misc.c
--- ircd-hybrid-5.3p8.orig/src/s_misc.c	2000-07-19 22:09:27.000000000 -0400
+++ ircd-hybrid-5.3p8/src/s_misc.c	2004-01-23 16:19:14.000000000 -0500
@@ -38,7 +38,7 @@
     !defined(__convex__)
 # include <sys/param.h>
 #endif
-#if defined(AIX) || defined(SVR3)
+#if defined(AIX) || defined(SVR3) || defined(__linux__)
 # include <time.h>
 #endif
 #ifdef HPUX
diff -urN ircd-hybrid-5.3p8.orig/src/s_serv.c ircd-hybrid-5.3p8/src/s_serv.c
--- ircd-hybrid-5.3p8.orig/src/s_serv.c	2000-07-19 22:09:27.000000000 -0400
+++ ircd-hybrid-5.3p8/src/s_serv.c	2004-01-23 16:19:41.000000000 -0500
@@ -36,10 +36,14 @@
 #include "numeric.h"
 #include "msg.h"
 #include "channel.h"
+#ifdef LOCAL_RESOLV
 #include "nameser.h"
-#include "resolv.h"
+#include "local_resolv.h"
+#else
+#include <resolv.h>
+#endif
 
-#if defined(AIX) || defined(DYNIXPTX) || defined(SVR3)
+#if defined(AIX) || defined(DYNIXPTX) || defined(SVR3) || defined(__linux__)
 #include <time.h>
 #endif
 #include <sys/stat.h>
