$NetBSD$

--- system.c.orig	2005-12-15 22:54:59.000000000 +0000
+++ system.c
@@ -22,6 +22,7 @@ static char rcsid[] = "$Id: system.c,v 1
 #ifdef	HAVE_SIGNAL_H
 #include <signal.h>
 #endif
+#include <errno.h>
 
 #include "compat.h"
 #include "tty.h"
@@ -33,7 +34,6 @@ struct pmsg_entry {
 	TAILQ_ENTRY(pmsg_entry) pme_entries;
 };
 
-extern int	errno;
 extern char	ppre[];
 
 int	syspipe;
