Files
mruby-mruby/mrbgems/mruby-socket/mrbgem.rake
T
Yukihiro "Matz" Matsumoto 22df8d61be mruby-socket: restore Windows link libraries dropped during HAL migration
Commit d9e107c801 ("mruby-socket: migrate HAL to ports/ directories")
moved the Windows HAL source into mruby-socket/ports/win/ but dropped
the linker.libraries declarations that previously lived in
hal-win-socket/mrbgem.rake. Both mingw and MSVC builds now fail to
link with undefined references to WSAStartup, socket, send, and other
Winsock APIs. Re-declare wsock32 and ws2_32 under a for_windows? guard.

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-23 23:16:02 +09:00

17 lines
498 B
Ruby

MRuby::Gem::Specification.new('mruby-socket') do |spec|
spec.license = 'MIT'
spec.authors = ['Internet Initiative Japan Inc.', 'mruby developers']
spec.summary = 'standard socket class'
#spec.cc.defines << "HAVE_SA_LEN=0"
spec.add_dependency('mruby-io', :core => 'mruby-io')
spec.add_dependency('mruby-error', :core => 'mruby-error')
# spec.add_dependency('mruby-mtest')
if spec.for_windows?
spec.linker.libraries << "wsock32"
spec.linker.libraries << "ws2_32"
end
end