cvs: ZendEngine2(PHP_5_2) / zend_alloc.c

[email protected] ("Felipe Pena") Wed, 01 Apr 2009 16:56:09 -0000
Newsgroups php.zend-engine.cvs
Message-ID <cvsfelipe1238604969@cvsserver>
felipe		Wed Apr  1 16:56:09 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /ZendEngine2	zend_alloc.c 
  Log:
  - MFH: Fixed bug #47852 (Compilation failure in zend_alloc.c) (Matteo)
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.c?r1=1.144.2.3.2.54&r2=1.144.2.3.2.55&diff_format=u
Index: ZendEngine2/zend_alloc.c
diff -u ZendEngine2/zend_alloc.c:1.144.2.3.2.54 ZendEngine2/zend_alloc.c:1.144.2.3.2.55
--- ZendEngine2/zend_alloc.c:1.144.2.3.2.54	Sun Jan 25 14:04:09 2009
+++ ZendEngine2/zend_alloc.c	Wed Apr  1 16:56:08 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_alloc.c,v 1.144.2.3.2.54 2009/01/25 14:04:09 dsp Exp $ */
+/* $Id: zend_alloc.c,v 1.144.2.3.2.55 2009/04/01 16:56:08 felipe Exp $ */
 
 #include "zend.h"
 #include "zend_alloc.h"
@@ -148,7 +148,12 @@
 {
 	zend_mm_segment *ret;
 #ifdef HAVE_MREMAP
+#if defined(__NetBSD__)
+	/* NetBSD 5 supports mremap but takes an extra newp argument */
+	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);