From 788848e123c056b6204f7555a0118377aa4bd8e1 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 30 Oct 2019 23:03:49 -0400 Subject: [PATCH] std.net: fix reference to incorrect constant name --- lib/std/net.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/net.zig b/lib/std/net.zig index eca313a84c..2ec686dc6e 100644 --- a/lib/std/net.zig +++ b/lib/std/net.zig @@ -1271,7 +1271,7 @@ pub const TcpServer = struct { pub fn listen(self: *TcpServer, address: IpAddress) !void { const nonblock = if (std.io.is_async) os.SOCK_NONBLOCK else 0; const sock_flags = os.SOCK_STREAM | os.SOCK_CLOEXEC | nonblock; - const sockfd = try os.socket(os.AF_INET, sock_flags, os.PROTO_tcp); + const sockfd = try os.socket(os.AF_INET, sock_flags, os.IPPROTO_TCP); self.sockfd = sockfd; errdefer { os.close(sockfd);