pkgsrc/devel/electricfence/patches/patch-ab
hubertf d564911ef1 Update to ElectricFence 2.1nb1:
Fix this pkg to run on sparc64 (and probably some others), by changing the
2ns argument of mmap(2) from (int)size to size.

Patches contributed by Volker Stolz <stolz@hyperion.informatik.rwth-aachen.de>
in PR pkg/14493.
2001-11-09 00:39:38 +00:00

39 lines
807 B
Text

$NetBSD: patch-ab,v 1.3 2001/11/09 00:39:39 hubertf 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))
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