{core,sysaudio}: update to latest Zig API

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-06-30 20:39:40 -07:00
parent c89a972651
commit 923cce1fc3
2 changed files with 2 additions and 2 deletions

View file

@ -209,7 +209,7 @@ pub fn Sdk(comptime deps: anytype) type {
if (app.res_dirs) |res_dirs| { if (app.res_dirs) |res_dirs| {
for (res_dirs) |res| { for (res_dirs) |res| {
const install_res = app.b.addInstallDirectory(.{ const install_res = app.b.addInstallDirectory(.{
.source_dir = res, .source_dir = .{ .path = res },
.install_dir = app.getInstallStep().?.dest_dir, .install_dir = app.getInstallStep().?.dest_dir,
.install_subdir = std.fs.path.basename(res), .install_subdir = std.fs.path.basename(res),
.exclude_extensions = &.{}, .exclude_extensions = &.{},

View file

@ -273,7 +273,7 @@ pub const Context = struct {
var i: usize = 0; var i: usize = 0;
var evt: *inotify_event = undefined; var evt: *inotify_event = undefined;
while (i < buf.len) : (i += @sizeOf(inotify_event) + evt.len) { while (i < buf.len) : (i += @sizeOf(inotify_event) + evt.len) {
evt = @as(*inotify_event, @ptrCast(@alignCast(4, buf[i..]))); evt = @as(*inotify_event, @ptrCast(@alignCast(buf[i..])));
const evt_name = @as([*]u8, @ptrCast(buf[i..]))[@sizeOf(inotify_event) .. @sizeOf(inotify_event) + 8]; const evt_name = @as([*]u8, @ptrCast(buf[i..]))[@sizeOf(inotify_event) .. @sizeOf(inotify_event) + 8];
if (evt.mask & std.os.linux.IN.ISDIR != 0 or !std.mem.startsWith(u8, evt_name, "pcm")) if (evt.mask & std.os.linux.IN.ISDIR != 0 or !std.mem.startsWith(u8, evt_name, "pcm"))