Skip to content

Commit d545b1d

Browse files
authored
Add missing ext/pcre dependency for ext/pgsql (#14541)
1 parent 5d3fab9 commit d545b1d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

ext/pgsql/config.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ if test "$PHP_PGSQL" != "no"; then
9393
PHP_ADD_INCLUDE($PGSQL_INCLUDE)
9494

9595
PHP_NEW_EXTENSION(pgsql, pgsql.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
96+
PHP_ADD_EXTENSION_DEP(pgsql, pcre)
9697
fi

ext/pgsql/config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ if (PHP_PGSQL != "no") {
88
EXTENSION("pgsql", "pgsql.c", PHP_PGSQL_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
99
AC_DEFINE('HAVE_PGSQL', 1, 'Have PostgreSQL library');
1010
ADD_FLAG("CFLAGS_PGSQL", "/D PGSQL_EXPORTS /D HAVE_PQFREEMEM /D HAVE_PGSQL_WITH_MULTIBYTE_SUPPORT" + (X64 ? " /D HAVE_PG_LO64" : "") + " ");
11+
ADD_EXTENSION_DEP('pgsql', 'pcre');
1112
} else {
1213
WARNING("pgsql not enabled; libraries and headers not found");
1314
}

ext/pgsql/pgsql.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,15 @@ char pgsql_libpq_version[16];
123123
ZEND_DECLARE_MODULE_GLOBALS(pgsql)
124124
static PHP_GINIT_FUNCTION(pgsql);
125125

126+
static const zend_module_dep pgsql_module_deps[] = {
127+
ZEND_MOD_REQUIRED("pcre")
128+
ZEND_MOD_END
129+
};
130+
126131
/* {{{ pgsql_module_entry */
127132
zend_module_entry pgsql_module_entry = {
128-
STANDARD_MODULE_HEADER,
133+
STANDARD_MODULE_HEADER_EX, NULL,
134+
pgsql_module_deps,
129135
"pgsql",
130136
ext_functions,
131137
PHP_MINIT(pgsql),

0 commit comments

Comments
 (0)