Skip to content

Commit 5551155

Browse files
Add @intcast for 32-bit builds
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
1 parent f041bf9 commit 5551155

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/c/c.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export fn sdfgen_dtb_parse(path: [*c]u8) ?*anyopaque {
7979
log.err("could not stat DTB '{s}' for parsing with error: {any}", .{ path, e });
8080
return null;
8181
};
82-
const bytes = file.reader().readAllAlloc(allocator, stat.size) catch |e| {
82+
const bytes = file.reader().readAllAlloc(allocator, @intCast(stat.size)) catch |e| {
8383
log.err("could not read DTB '{s}' for parsing with error: {any}", .{ path, e });
8484
return null;
8585
};

src/sddf.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub fn probe(allocator: Allocator, path: []const u8) !void {
149149
log.err("failed to stat driver config file: {s}: {}", .{ config_path, e });
150150
return e;
151151
};
152-
const config_bytes = try config_file.reader().readAllAlloc(allocator, config_file_stat.size);
152+
const config_bytes = try config_file.reader().readAllAlloc(allocator, @intCast(config_file_stat.size));
153153
// TODO; free config? we'd have to dupe the json data when populating our data structures
154154
assert(config_bytes.len == config_file_stat.size);
155155
// TODO: should probably free the memory at some point

0 commit comments

Comments
 (0)