From 37a0b0e5512b98a601c9eccdb9226956514d0ed6 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 3 Aug 2016 20:23:55 +0200 Subject: [PATCH] Fix json/spl dependencies Fix json header include and specify dependencies to enforce module loading order. Otherwise an in-tree build will fail. --- php_ds.c | 10 +++++++++- php_ds.h | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/php_ds.c b/php_ds.c index 1eb8e18..2c4e976 100644 --- a/php_ds.c +++ b/php_ds.c @@ -69,8 +69,16 @@ PHP_MINFO_FUNCTION(ds) php_info_print_table_end(); } +static const zend_module_dep ds_deps[] = { + ZEND_MOD_REQUIRED("json") + ZEND_MOD_REQUIRED("spl") + ZEND_MOD_END +}; + zend_module_entry ds_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER_EX, + NULL, + ds_deps, "ds", NULL, PHP_MINIT(ds), diff --git a/php_ds.h b/php_ds.h index bfe7f2c..1dc9202 100644 --- a/php_ds.h +++ b/php_ds.h @@ -13,7 +13,7 @@ #include "ext/spl/spl_iterators.h" #include "ext/spl/spl_exceptions.h" #include "zend_smart_str.h" -#include "json/php_json.h" +#include "ext/json/php_json.h" extern zend_module_entry ds_module_entry;