mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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>
This commit is contained in:
@@ -8,4 +8,9 @@ MRuby::Gem::Specification.new('mruby-socket') do |spec|
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user