Skip to content

Commit 37a0b0e

Browse files
committed
Fix json/spl dependencies
Fix json header include and specify dependencies to enforce module loading order. Otherwise an in-tree build will fail.
1 parent 5e59fbc commit 37a0b0e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

php_ds.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,16 @@ PHP_MINFO_FUNCTION(ds)
6969
php_info_print_table_end();
7070
}
7171

72+
static const zend_module_dep ds_deps[] = {
73+
ZEND_MOD_REQUIRED("json")
74+
ZEND_MOD_REQUIRED("spl")
75+
ZEND_MOD_END
76+
};
77+
7278
zend_module_entry ds_module_entry = {
73-
STANDARD_MODULE_HEADER,
79+
STANDARD_MODULE_HEADER_EX,
80+
NULL,
81+
ds_deps,
7482
"ds",
7583
NULL,
7684
PHP_MINIT(ds),

php_ds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "ext/spl/spl_iterators.h"
1414
#include "ext/spl/spl_exceptions.h"
1515
#include "zend_smart_str.h"
16-
#include "json/php_json.h"
16+
#include "ext/json/php_json.h"
1717

1818
extern zend_module_entry ds_module_entry;
1919

0 commit comments

Comments
 (0)