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";