Commit e4704f68f8
Changed files (1)
lib
std
lib/std/net.zig
@@ -1303,7 +1303,7 @@ pub const StreamServer = struct {
pub fn listen(self: *StreamServer, address: Address) !void {
const nonblock = if (std.io.is_async) os.SOCK_NONBLOCK else 0;
const sock_flags = os.SOCK_STREAM | os.SOCK_CLOEXEC | nonblock;
- const proto = if (address.any.family == os.AF_UNIX) u32(0) else os.IPPROTO_TCP;
+ const proto = if (address.any.family == os.AF_UNIX) @as(u32, 0) else os.IPPROTO_TCP;
const sockfd = try os.socket(address.any.family, sock_flags, proto);
self.sockfd = sockfd;
errdefer {