$NetBSD$

--- shm.c.orig	2005-12-15 22:55:48.000000000 +0000
+++ shm.c
@@ -60,6 +60,8 @@ static char rcsid[] = "$Id: shm.c,v 1.18
 #endif
 #endif	/* HAVE_SVIPC_SHM */
 
+#include <errno.h>
+
 #include "compat.h"
 #include "colour.h"
 
@@ -89,7 +91,6 @@ union overhead {
 
 #define	MAGIC	0xef	/* magic # on accounting info */
 
-extern int	errno;
 extern char	*myname;	/* in main.c */
 
 static void	morecore __P((int));
