diff options
| author | Jan Prudil <57442prudil@sstebrno.eu> | 2020-10-17 14:09:59 +0200 |
|---|---|---|
| committer | Jan Prudil <57442prudil@sstebrno.eu> | 2020-10-17 14:09:59 +0200 |
| commit | aadccc4206ea605719de789bc7c9c48557d02331 (patch) | |
| tree | 631f4d25f6c8bf6cefdcbe58f3ac9f61434b6402 /lib/std/os.zig | |
| parent | 245d98d32dd29e80de9732f415a4731748008acf (diff) | |
| download | zig-aadccc4206ea605719de789bc7c9c48557d02331.tar.gz zig-aadccc4206ea605719de789bc7c9c48557d02331.zip | |
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); |
