Skip to content

Commit dedf8fb

Browse files
authored
Add missing pcre dependency definition to zip extension (#14404)
The zip extension also requires the pcre extension.
1 parent 25a5146 commit dedf8fb

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

ext/zip/config.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ if test "$PHP_ZIP" != "no"; then
6363

6464
PHP_ZIP_SOURCES="php_zip.c zip_stream.c"
6565
PHP_NEW_EXTENSION(zip, $PHP_ZIP_SOURCES, $ext_shared)
66+
PHP_ADD_EXTENSION_DEP(zip, pcre)
6667

6768
PHP_SUBST(ZIP_SHARED_LIBADD)
6869
fi

ext/zip/config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ if (PHP_ZIP != "no") {
99
CHECK_LIB("libzip_a.lib", "zip", PHP_ZIP) && CHECK_LIB("libbz2_a.lib", "zip", PHP_ZIP) && CHECK_LIB("zlib_a.lib", "zip", PHP_ZIP) && CHECK_LIB("liblzma_a.lib", "zip", PHP_ZIP))
1010
) {
1111
EXTENSION('zip', 'php_zip.c zip_stream.c');
12+
ADD_EXTENSION_DEP('zip', 'pcre');
1213

1314
if (get_define("LIBS_ZIP").match("libzip_a(?:_debug)?\.lib")) {
1415
/* Using static dependency lib. */

ext/zip/php_zip.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1146,9 +1146,15 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
11461146
static PHP_MINFO_FUNCTION(zip);
11471147
/* }}} */
11481148

1149+
static const zend_module_dep zip_deps[] = {
1150+
ZEND_MOD_REQUIRED("pcre")
1151+
ZEND_MOD_END
1152+
};
1153+
11491154
/* {{{ zip_module_entry */
11501155
zend_module_entry zip_module_entry = {
1151-
STANDARD_MODULE_HEADER,
1156+
STANDARD_MODULE_HEADER_EX, NULL,
1157+
zip_deps,
11521158
"zip",
11531159
ext_functions,
11541160
PHP_MINIT(zip),

0 commit comments

Comments
 (0)