$NetBSD$

--- ircx.c.orig	2005-12-15 22:52:05.000000000 +0000
+++ ircx.c
@@ -30,6 +30,7 @@ static char rcsid[] = "$Id: ircx.c,v 1.4
 #ifdef	HAVE_CTYPE_H
 #include <ctype.h>
 #endif
+#include <errno.h>
 
 #include "compat.h"
 #include "tty.h"
@@ -74,7 +75,6 @@ extern struct channel *cha;
 extern char	ppre[], *our_address;
 extern int	sock;
 extern void	(*othercmd) __P((char *));
-extern int	errno;
 extern int	is_away;
 
 struct i_entry	*i_first;
