use at-as

This commit is contained in:
Luna 2019-11-09 15:10:39 -03:00
parent fc2e8f92b2
commit e4704f68f8

View File

@ -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 {