fix regressions
parent
f5ff36271b
commit
24b3da871d
|
@ -37,7 +37,7 @@ test "ip4s" {
|
||||||
"1.2.3.4",
|
"1.2.3.4",
|
||||||
"123.255.0.91",
|
"123.255.0.91",
|
||||||
}) |ip| {
|
}) |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;
|
var newIp = std.fmt.bufPrint(buffer[0..], "{}", addr) catch unreachable;
|
||||||
std.testing.expect(std.mem.eql(u8, ip, newIp[0 .. newIp.len - 2]));
|
std.testing.expect(std.mem.eql(u8, ip, newIp[0 .. newIp.len - 2]));
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,8 +236,8 @@ pub fn poll(fds: [*]pollfd, n: nfds_t, timeout: i32) usize {
|
||||||
n,
|
n,
|
||||||
@ptrToInt(if (timeout >= 0)
|
@ptrToInt(if (timeout >= 0)
|
||||||
×pec{
|
×pec{
|
||||||
.tv_sec = timeout / 1000,
|
.tv_sec = @divTrunc(timeout, 1000),
|
||||||
.tv_nsec = (timeout % 1000) * 1000000,
|
.tv_nsec = @rem(timeout, 1000) * 1000000,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
null),
|
null),
|
||||||
|
|
Loading…
Reference in New Issue