fix regressions

master
Andrew Kelley 2019-10-30 12:49:37 -04:00
parent f5ff36271b
commit 24b3da871d
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ test "ip4s" {
"1.2.3.4",
"123.255.0.91",
}) |ip| {
var addr = Address.initIp4(parseIp4(ip) catch unreachable, 0);
var addr = net.Address.initIp4(net.parseIp4(ip) catch unreachable, 0);
var newIp = std.fmt.bufPrint(buffer[0..], "{}", addr) catch unreachable;
std.testing.expect(std.mem.eql(u8, ip, newIp[0 .. newIp.len - 2]));
}

View File

@ -236,8 +236,8 @@ pub fn poll(fds: [*]pollfd, n: nfds_t, timeout: i32) usize {
n,
@ptrToInt(if (timeout >= 0)
&timespec{
.tv_sec = timeout / 1000,
.tv_nsec = (timeout % 1000) * 1000000,
.tv_sec = @divTrunc(timeout, 1000),
.tv_nsec = @rem(timeout, 1000) * 1000000,
}
else
null),