aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-10-30 12:49:37 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-10-30 12:49:37 -0400
commit24b3da871d7ab45d373c7ad05b30a1b96b41be50 (patch)
tree9d2ca119bb93ef07a6b09854c5526d47553bda06 /lib/std
parentf5ff36271bce54eaec6f20cdff4fa4efb833c0d4 (diff)
downloadzig-24b3da871d7ab45d373c7ad05b30a1b96b41be50.tar.gz
zig-24b3da871d7ab45d373c7ad05b30a1b96b41be50.zip
fix regressions
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/net/test.zig2
-rw-r--r--lib/std/os/linux.zig4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/net/test.zig b/lib/std/net/test.zig
index 6322401577..c65f05e822 100644
--- a/lib/std/net/test.zig
+++ b/lib/std/net/test.zig
@@ -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]));
}
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig
index cf7a5dffb0..d9f1f4e311 100644
--- a/lib/std/os/linux.zig
+++ b/lib/std/os/linux.zig
@@ -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),