From 81bdf07686dbac3974213b03739ed7083d8d88dd Mon Sep 17 00:00:00 2001 From: cdoco Date: Thu, 31 May 2018 14:23:50 +0800 Subject: [PATCH] FIx #1 make test faild --- config.m4 | 1 + jwt.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config.m4 b/config.m4 index 673107a..3f4ab0f 100644 --- a/config.m4 +++ b/config.m4 @@ -39,5 +39,6 @@ fi if test "$PHP_JWT" != "no"; then PHP_SUBST(JWT_SHARED_LIBADD) + PHP_ADD_EXTENSION_DEP(jwt, json) PHP_NEW_EXTENSION(jwt, jwt.c openssl.c, $ext_shared) fi diff --git a/jwt.c b/jwt.c index a682a55..4a35467 100644 --- a/jwt.c +++ b/jwt.c @@ -438,8 +438,14 @@ PHP_MINFO_FUNCTION(jwt) php_info_print_table_end(); } +static const zend_module_dep jwt_dep_deps[] = { + ZEND_MOD_REQUIRED("json") + ZEND_MOD_END +}; + zend_module_entry jwt_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER_EX, NULL, + jwt_dep_deps, "jwt", jwt_functions, PHP_MINIT(jwt),