From b02e6af03f4d0b1ab03011746de9a6654b48dfad Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 27 Jun 2024 00:31:32 +0200 Subject: [PATCH] Sync missing hash and pcre dependencies for opcache on Windows - ext/hash is required only on Windows - ext/pcre is required --- ext/opcache/ZendAccelerator.c | 5 ++++- ext/opcache/config.w32 | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index a5a3f606082d1..96a400ee29c3a 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -48,7 +48,10 @@ #include "zend_file_cache.h" #include "ext/pcre/php_pcre.h" #include "ext/standard/md5.h" -#include "ext/hash/php_hash.h" + +#ifdef ZEND_WIN32 +# include "ext/hash/php_hash.h" +#endif #ifdef HAVE_JIT # include "jit/zend_jit.h" diff --git a/ext/opcache/config.w32 b/ext/opcache/config.w32 index 24b4acaabcdc0..9d1083b2631c8 100644 --- a/ext/opcache/config.w32 +++ b/ext/opcache/config.w32 @@ -18,6 +18,9 @@ if (PHP_OPCACHE != "no") { zend_shared_alloc.c \ shared_alloc_win32.c", true, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); + ADD_EXTENSION_DEP('opcache', 'hash'); + ADD_EXTENSION_DEP('opcache', 'pcre'); + if (PHP_OPCACHE_JIT == "yes") { if (CHECK_HEADER_ADD_INCLUDE("ir/ir.h", "CFLAGS_OPCACHE", PHP_OPCACHE + ";ext\\opcache\\jit")) { var dasm_flags = (X64 ? "-D X64=1" : "") + (X64 ? " -D X64WIN=1" : "") + " -D WIN=1";