diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-10-17 18:55:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-17 18:55:25 -0400 |
| commit | 9052e0b1377e4c4cd23b979b4a486df27a3444bd (patch) | |
| tree | bbba594e6093bbe420968882de3c345e82470794 /lib/std/os.zig | |
| parent | fa17447090500b67c515c023376ab66201f8f088 (diff) | |
| parent | 132813849ce593db232751e55c0d0fe7636d87f1 (diff) | |
| download | zig-9052e0b1377e4c4cd23b979b4a486df27a3444bd.tar.gz zig-9052e0b1377e4c4cd23b979b4a486df27a3444bd.zip | |
Merge pull request #6713 from jprudil/close-6697
Make std.meta.Int accept a signedness parameter
Diffstat (limited to 'lib/std/os.zig')
| -rw-r--r-- | lib/std/os.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig index 4a06d3c0bb..7329e94348 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -4494,7 +4494,7 @@ pub fn res_mkquery( // Make a reasonably unpredictable id var ts: timespec = undefined; clock_gettime(CLOCK_REALTIME, &ts) catch {}; - const UInt = std.meta.Int(false, std.meta.bitCount(@TypeOf(ts.tv_nsec))); + const UInt = std.meta.Int(.unsigned, std.meta.bitCount(@TypeOf(ts.tv_nsec))); const unsec = @bitCast(UInt, ts.tv_nsec); const id = @truncate(u32, unsec + unsec / 65536); q[0] = @truncate(u8, id / 256); |
