fix for 0.15 master and tested

This commit is contained in:
yuzu 2025-05-15 15:06:05 -05:00
parent b242ec16f3
commit 17144a7981

View File

@ -65,7 +65,7 @@ fn zalloc(private: ?*anyopaque, items: c_uint, size: c_uint) callconv(.C) ?*anyo
return null;
const allocator: *Allocator = @ptrCast(@alignCast(private.?));
var buf = allocator.allocWithOptions(u8, ZallocHeader.size_of_aligned + (items * size), @alignOf(*ZallocHeader), null) catch return null;
var buf = allocator.allocWithOptions(u8, ZallocHeader.size_of_aligned + (items * size), std.mem.Alignment.of(*ZallocHeader), null) catch return null;
const header: *ZallocHeader = @ptrCast(@alignCast(buf.ptr));
header.* = .{
.magic = magic_value,