Skip to content

Commit f68f64a

Browse files
committed
fix: build error in 32 bit platforms due to 64 bit atomics
1 parent acdeb6d commit f68f64a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/install.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub fn download_tarball(alloc: Allocator, client: *Client, tb_url: []const u8, t
120120
var buff: [1024]u8 = undefined;
121121

122122
// Convert everything into f64 for less typing in calculating % download and download speed
123-
var dlnow = std.atomic.Value(f64).init(0);
123+
var dlnow = std.atomic.Value(f32).init(0);
124124
const total_size_double: f64 = @floatFromInt(total_size);
125125

126126
const progress_thread = try std.Thread.spawn(.{}, download_progress_bar, .{ &dlnow, @as(f64, @floatFromInt(tarball_size)), total_size_double });
@@ -137,7 +137,7 @@ pub fn download_tarball(alloc: Allocator, client: *Client, tb_url: []const u8, t
137137
try tb_writer.flush();
138138
}
139139

140-
pub fn download_progress_bar(dlnow: *std.atomic.Value(f64), tarball_size: f64, total_size: f64) !void {
140+
pub fn download_progress_bar(dlnow: *std.atomic.Value(f32), tarball_size: f64, total_size: f64) !void {
141141
var stderr_writer = std.io.getStdErr().writer();
142142
var progress_bar: [150]u8 = ("░" ** 50).*;
143143
var bars: u8 = 0;

0 commit comments

Comments
 (0)