$NetBSD$

--- src/elm.c.orig	2006-01-24 17:18:55.000000000 +0000
+++ src/elm.c
@@ -15,6 +15,7 @@ static char rcsid[] = "@(#)$Id: elm.c,v 
 /* Main program of the ELM mail system! 
 */
 
+#include <errno.h>
 #include "patchlevel.h"
 #include "elm.h"
 #include "s_elm.h"
@@ -90,7 +91,6 @@ int main(argc, argv)
 	char **to_whom = NULL;
 	int bytes;
 	int  i,j;      		/** Random counting variables (etc)          **/
-	extern int errno;
 
 	set_panic_prepare(elm_panic_prepare);
 	set_panic_exit(elm_panic_exit);
