Skip to content

Commit ae71779

Browse files
committed
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.
1 parent d19fdaa commit ae71779

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/ffi/ffi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2975,6 +2975,7 @@ static zend_always_inline bool zend_ffi_validate_api_restriction(zend_execute_da
29752975
} while (0)
29762976

29772977
#ifdef PHP_WIN32
2978+
# include <Psapi.h>
29782979
# ifndef DWORD_MAX
29792980
# define DWORD_MAX ULONG_MAX
29802981
# endif

0 commit comments

Comments
 (0)