mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-io: restore Windows link library dropped during HAL migration
Commit 9965f11cfe1c ("mruby-io: migrate HAL to ports/ directories")
moved the Windows HAL source into mruby-io/ports/win/ but dropped the
linker.libraries declaration that previously lived in
hal-win-io/mrbgem.rake. Both mingw and MSVC builds now fail to link
with undefined references to closesocket, WSAStartup, WSACleanup,
select, and WSAGetLastError referenced from io.c and io_hal.c.
Re-declare ws2_32 under a for_windows? guard.
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,4 +5,8 @@ MRuby::Gem::Specification.new('mruby-io') do |spec|
|
||||
|
||||
spec.build.defines << "HAVE_MRUBY_IO_GEM"
|
||||
spec.add_test_dependency 'mruby-time', core: 'mruby-time'
|
||||
|
||||
if spec.for_windows?
|
||||
spec.linker.libraries << "ws2_32"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user