$NetBSD: patch-al,v 1.2 2003/07/31 15:12:40 bencollver Exp $

--- src/nv3.c.orig	Sat Mar 31 10:36:51 2001
+++ src/nv3.c
@@ -17,6 +17,7 @@ there are still the following problems:
 #include <stdlib.h>
 #include <stdio.h>		/* for printf */
 #include <string.h>		/* for memset */
+#include <sys/types.h>
 #include <sys/mman.h>		
 #include <fcntl.h>
 #include <math.h>
@@ -578,7 +579,7 @@ DriverSpecs __svgalib_nv3_driverspecs =
 
 #define MapDevice(device,base) \
   nv##device##Port=(unsigned*)(mmap(0, \
-     	DEVICE_SIZE(device),PROT_WRITE,MAP_SHARED,__svgalib_mem_fd,\
+     	DEVICE_SIZE(device),PROT_WRITE|PROT_READ,MAP_SHARED,__svgalib_mem_fd,\
         (MMIOBASE)+DEVICE_BASE(device)))
 
 /* Initialize chipset (called after detection) */
