From 24b3da871d7ab45d373c7ad05b30a1b96b41be50 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 30 Oct 2019 12:49:37 -0400 Subject: [PATCH] fix regressions --- lib/std/net/test.zig | 2 +- lib/std/os/linux.zig | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/std/net/test.zig b/lib/std/net/test.zig index 632240157..c65f05e82 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 cf7a5dffb..d9f1f4e31 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) ×pec{ - .tv_sec = timeout / 1000, - .tv_nsec = (timeout % 1000) * 1000000, + .tv_sec = @divTrunc(timeout, 1000), + .tv_nsec = @rem(timeout, 1000) * 1000000, } else null),