diff --git a/spec/std/socket/tcp_server_spec.cr b/spec/std/socket/tcp_server_spec.cr index 49d68d438699..75de1fc1de89 100644 --- a/spec/std/socket/tcp_server_spec.cr +++ b/spec/std/socket/tcp_server_spec.cr @@ -54,7 +54,7 @@ describe TCPServer do it "raises when not binding with reuse_port" do TCPServer.open(address, 0, reuse_port: true) do |server| - expect_raises_errno(Errno::EADDRINUSE, {% if flag?(:linux) %}"listen: "{% else %}"bind: "{% end %}) do + expect_raises_errno(Errno::EADDRINUSE, {% if flag?(:linux) && !flag?(:musl) %}"listen: "{% else %}"bind: "{% end %}) do TCPServer.open(address, server.local_address.port) { } end end