$NetBSD$

--- msdos/fat_fileio.c.orig	2006-01-15 18:54:48.000000000 +0000
+++ msdos/fat_fileio.c
@@ -30,6 +30,7 @@ To send email to the maintainer of the W
 
 #include "platform.h"
 
+#include <errno.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
@@ -132,7 +133,6 @@ fat_open(DWORD p1, DWORD p2, DWORD p3, D
         int     DosHandle;
 
         int     slot,handle,freeslot;
-        extern  int errno;
         int     nclosed;
         LPMFSFILE   fp;
 	DWORD   DosDrive;
