Skip to content

Commit 5a17694

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Check compatibility with proper runtime DLL
2 parents e696732 + bfcee2c commit 5a17694

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
@@ -2142,12 +2142,18 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
21422142
#ifdef PHP_WIN32
21432143
# if PHP_LINKER_MAJOR == 14
21442144
/* Extend for other CRT if needed. */
2145+
# if PHP_DEBUG
2146+
# define PHP_VCRUNTIME "vcruntime140d.dll"
2147+
# else
2148+
# define PHP_VCRUNTIME "vcruntime140.dll"
2149+
# endif
21452150
char *img_err;
2146-
if (!php_win32_crt_compatible("vcruntime140.dll", &img_err)) {
2151+
if (!php_win32_crt_compatible(PHP_VCRUNTIME, &img_err)) {
21472152
php_error(E_CORE_WARNING, img_err);
21482153
efree(img_err);
21492154
return FAILURE;
21502155
}
2156+
# undef PHP_VCRUNTIME
21512157
# endif
21522158

21532159
/* start up winsock services */

0 commit comments

Comments
 (0)