From 121fa24a3451b45c41ac0a661b64e9fc8600e589 Mon Sep 17 00:00:00 2001 From: xtkoba <69125751+xtkoba@users.noreply.github.com> Date: Fri, 30 Apr 2021 21:35:15 +0900 Subject: [PATCH] Adjust struct member offset for i386 Cygwin Fixes [Bug #17606] --- vm_core.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vm_core.h b/vm_core.h index 31ac4ace76..f21d85032c 100644 --- a/vm_core.h +++ b/vm_core.h @@ -218,6 +218,10 @@ struct rb_control_frame_struct; /* iseq data type */ typedef struct rb_compile_option_struct rb_compile_option_t; +#if (SIZEOF_SERIAL_T > SIZEOF_VOIDP) && defined(__CYGWIN__) +#pragma pack(push, 4) /* == SIZEOF_VOIDP */ +#endif + // imemo_constcache struct iseq_inline_constant_cache_entry { VALUE flags; @@ -228,6 +232,10 @@ struct iseq_inline_constant_cache_entry { // v3 }; +#if (SIZEOF_SERIAL_T > SIZEOF_VOIDP) && defined(__CYGWIN__) +#pragma pack(pop) +#endif + struct iseq_inline_constant_cache { struct iseq_inline_constant_cache_entry *entry; };