Skip to content

Commit bfcee2c

Browse files
committed
Check compatibility with proper runtime DLL
In practise, this likely does not matter, because usually these DLLs are installed side by side, but still we should check the proper DLL.
1 parent 3978d3a commit bfcee2c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

main/main.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2174,12 +2174,18 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
21742174
#ifdef PHP_WIN32
21752175
# if PHP_LINKER_MAJOR == 14
21762176
/* Extend for other CRT if needed. */
2177+
# if PHP_DEBUG
2178+
# define PHP_VCRUNTIME "vcruntime140d.dll"
2179+
# else
2180+
# define PHP_VCRUNTIME "vcruntime140.dll"
2181+
# endif
21772182
char *img_err;
2178-
if (!php_win32_crt_compatible("vcruntime140.dll", &img_err)) {
2183+
if (!php_win32_crt_compatible(PHP_VCRUNTIME, &img_err)) {
21792184
php_error(E_CORE_WARNING, img_err);
21802185
efree(img_err);
21812186
return FAILURE;
21822187
}
2188+
# undef PHP_VCRUNTIME
21832189
# endif
21842190

21852191
/* start up winsock services */

0 commit comments

Comments
 (0)