pkgsrc/lang/php5/patches/patch-ad
taca f7c3b63dde - Add patches to fix CVE-2007-3806 referring CVS repository.
- Fix compile problem on NetBSD with mremap(2).

Bump PKGREVISION.
2007-08-01 01:40:07 +00:00

18 lines
571 B
Text

$NetBSD: patch-ad,v 1.1 2007/08/01 01:40:08 taca Exp $
Adapt NetBSD's remap(2).
--- Zend/zend_alloc.c.orig 2007-05-28 19:07:50.000000000 +0900
+++ Zend/zend_alloc.c
@@ -148,7 +148,11 @@ static zend_mm_segment* zend_mm_mem_mmap
{
zend_mm_segment *ret;
#ifdef HAVE_MREMAP
+#if defined(__NetBSD__)
+ ret = (zend_mm_segment*)mremap(segment, segment->size, segment, size, MREMAP_MAYMOVE);
+#else
ret = (zend_mm_segment*)mremap(segment, segment->size, size, MREMAP_MAYMOVE);
+#endif
if (ret == MAP_FAILED) {
#endif
ret = storage->handlers->_alloc(storage, size);