1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix Windows x86 build for ext/ffi

PR #16351 introduced `EnumProcessModules()` calls, but this function is
undefined; thus, the compiler mangles the name according to the default
calling convention.  This lets linking succeed for x64, but fail for
x86.

To properly fix this, we include <Psapi.h> where the function is
declared.
This commit is contained in:
Christoph M. Becker
2024-10-20 11:55:08 +02:00
parent d19fdaa4b7
commit ae717797e5

View File

@@ -2975,6 +2975,7 @@ static zend_always_inline bool zend_ffi_validate_api_restriction(zend_execute_da
} while (0)
#ifdef PHP_WIN32
# include <Psapi.h>
# ifndef DWORD_MAX
# define DWORD_MAX ULONG_MAX
# endif