mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
12bc2cfaa1
move fd, fd2, pid fields before the bitfield flags while keeping the pointer field last. this preserves the 24-byte struct size (same as 3.4.0) while restoring fd to offset 0 (same as 3.3.0). some external gems (e.g. mruby-polarssl) pass struct mrb_io pointers directly to libraries like mbedtls that expect an int fd at offset 0. the 3.4.0 reorder moved bitfield flags to offset 0, causing these gems to read garbage instead of the file descriptor. fixes #6713 Co-authored-by: Claude <noreply@anthropic.com>