From 0841b7aa5e5a3401f8b547d4763a2156e452d2ed Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Sat, 21 Nov 2020 20:10:27 -0500 Subject: [PATCH] Fix testStdCallCallbackStackAlignment on win32-x86 --- native/libffi/src/x86/ffi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/native/libffi/src/x86/ffi.c b/native/libffi/src/x86/ffi.c index 24431c170b..1359c2b820 100644 --- a/native/libffi/src/x86/ffi.c +++ b/native/libffi/src/x86/ffi.c @@ -182,6 +182,9 @@ ffi_prep_cif_machdep(ffi_cif *cif) { ffi_type *t = cif->arg_types[i]; +#if defined(_M_IX86) + if (cif->abi != FFI_STDCALL) +#endif bytes = FFI_ALIGN (bytes, t->alignment); bytes += FFI_ALIGN (t->size, FFI_SIZEOF_ARG); }