summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_sigsafe.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-05-14 16:47:22 +0300
committerDmitry Stogov <dmitry@zend.com>2015-05-14 16:47:22 +0300
commit0604df8a82084f2b7d4a46baf28edefa764c1dd2 (patch)
treee650cc24fad4a912bb805d6eab4667dc2f3e8397 /sapi/phpdbg/phpdbg_sigsafe.c
parent8e9b4b5aa7219b05c9659f3db3ae6d7014984bc8 (diff)
downloadphp-git-0604df8a82084f2b7d4a46baf28edefa764c1dd2.tar.gz
Fixed phpdbg build
Diffstat (limited to 'sapi/phpdbg/phpdbg_sigsafe.c')
-rw-r--r--sapi/phpdbg/phpdbg_sigsafe.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg_sigsafe.c b/sapi/phpdbg/phpdbg_sigsafe.c
index ce321595b1..319c9a5e75 100644
--- a/sapi/phpdbg/phpdbg_sigsafe.c
+++ b/sapi/phpdbg/phpdbg_sigsafe.c
@@ -29,13 +29,17 @@ static void zend_mm_mem_free(zend_mm_storage *storage, void *ptr, size_t size) {
void phpdbg_set_sigsafe_mem(char *buffer) {
phpdbg_signal_safe_mem *mem = &PHPDBG_G(sigsafe_mem);
+ const zend_mm_handlers phpdbg_handlers = {
+ zend_mm_mem_alloc,
+ zend_mm_mem_free,
+ NULL,
+ NULL,
+ };
+
mem->mem = buffer;
mem->allocated = 0;
- mem->storage.chunk_alloc = zend_mm_mem_alloc;
- mem->storage.chunk_free = zend_mm_mem_free;
-
- mem->heap = zend_mm_startup_ex(&mem->storage);
+ mem->heap = zend_mm_startup_ex(&phpdbg_handlers, NULL, 0);
mem->old_heap = zend_mm_set_heap(mem->heap);
}