From ec34c9334932995e4f6463ee32dd2d61951aa854 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 16 Oct 2025 19:14:54 +0900 Subject: [PATCH] mruby-io: use hal-win-io for mingw due to lack of fork/waitpid mingw provides posix file i/o apis but not unix process management functions (fork, waitpid) which are required by hal-posix-io. removed mingw from linux/bsd pattern to let for_windows? predicate select hal-win-io instead. Co-authored-by: Claude --- mrbgems/mruby-io/mrbgem.rake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mrbgems/mruby-io/mrbgem.rake b/mrbgems/mruby-io/mrbgem.rake index fa3c5a9b1..74ae70520 100644 --- a/mrbgems/mruby-io/mrbgem.rake +++ b/mrbgems/mruby-io/mrbgem.rake @@ -10,13 +10,10 @@ MRuby::Gem::Specification.new('mruby-io') do |spec| # HAL gems must be explicitly specified in build config (recommended) or via auto-selection below spec.build.gems.one? { |g| g.name =~ /^hal-.*-io$/ } or begin # No HAL found - determine appropriate error message or auto-load - # MinGW provides POSIX compatibility, so use hal-posix-io suggested_hal = if spec.build.primary_toolchain == 'visualcpp' # Visual C++ on Windows - use native Windows HAL 'hal-win-io' - elsif RUBY_PLATFORM =~ /linux|darwin|bsd|mingw/ || - (spec.build.kind_of?(MRuby::CrossBuild) && spec.build.host_target =~ /mingw/) || - spec.cc.command.to_s =~ /mingw/ + elsif RUBY_PLATFORM =~ /linux|darwin|bsd/ 'hal-posix-io' elsif spec.for_windows? 'hal-win-io'