blob: 7306b696b20cdd28a4ebd74514cf33caa467915e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$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);
|