summaryrefslogtreecommitdiff
path: root/devel/electricfence/patches/patch-ab
blob: 456c6b76ee43c7ead9308be5cbaae9a33b6cfa34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$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