Commit e6d05bea0b4c350edaaf215a81f49298f34b10e4

Ole André Vadla Ravnås 2022-09-01T14:51:15

Fix struct padding warning reported by MSVC (#613) When building on 32-bit x86.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/include/ffi.h.in b/include/ffi.h.in
index 6cd19ba..0aa5b61 100644
--- a/include/ffi.h.in
+++ b/include/ffi.h.in
@@ -345,6 +345,9 @@ typedef struct {
   ffi_cif   *cif;
   void     (*fun)(ffi_cif*,void*,void**,void*);
   void      *user_data;
+#if defined(_MSC_VER) && defined(_M_IX86)
+  void      *padding;
+#endif
 } ffi_closure
 #ifdef __GNUC__
     __attribute__((aligned (8)))