pkgsrc/devel/electricfence/patches/patch-ab
2004-06-08 19:51:36 +00:00

39 lines
827 B
Text

$NetBSD: patch-ab,v 1.4 2004/06/08 19:51:36 jschauma Exp $
--- page.c.orig Sat Apr 27 00:57:38 1996
+++ page.c
@@ -3,6 +3,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/mman.h>
+#include <sys/param.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
@@ -29,7 +30,7 @@
static caddr_t startAddr = (caddr_t) 0;
-#if ( !defined(sgi) && !defined(_AIX) )
+#if ( !defined(sgi) && !defined(_AIX) && !(defined(BSD) && BSD >= 199306)) && !defined(linux)
extern int sys_nerr;
extern char * sys_errlist[];
#endif
@@ -70,7 +71,7 @@
*/
allocation = (caddr_t) mmap(
startAddr
- ,(int)size
+ ,size
,PROT_READ|PROT_WRITE
,MAP_PRIVATE|MAP_ANONYMOUS
,-1
@@ -122,7 +123,7 @@
*/
allocation = (caddr_t) mmap(
startAddr
- ,(int)size
+ ,size
,PROT_READ|PROT_WRITE
,MAP_PRIVATE
,devZeroFd