From ae717797e5de5607b33074f2624f51994db41fd3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 20 Oct 2024 11:55:08 +0200 Subject: [PATCH] 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 where the function is declared. --- ext/ffi/ffi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/ffi/ffi.c b/ext/ffi/ffi.c index dc044885c02..4e7253b9010 100644 --- a/ext/ffi/ffi.c +++ b/ext/ffi/ffi.c @@ -2975,6 +2975,7 @@ static zend_always_inline bool zend_ffi_validate_api_restriction(zend_execute_da } while (0) #ifdef PHP_WIN32 +# include # ifndef DWORD_MAX # define DWORD_MAX ULONG_MAX # endif