pkgsrc/devel/electricfence/patches/patch-ac
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

13 lines
405 B
Text

$NetBSD: patch-ac,v 1.1 2001/11/09 00:39:39 hubertf Exp $
--- tstheap.c.orig Fri Jan 20 05:54:32 1995
+++ tstheap.c
@@ -47,7 +47,7 @@
for ( ; count < duration; count++ ) {
void * * element = &pool[(int)(drand48() * POOL_SIZE)];
- size_t size = (size_t)(drand48() * (LARGEST_BUFFER + 1));
+ size_t size = (size_t)(lrand48() % (LARGEST_BUFFER + 1));
if ( *element ) {
free( *element );