mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
fix fanotify_mark on 32-bit
This commit is contained in:
parent
40bab4df69
commit
ebd9efa850
@ -712,14 +712,27 @@ pub fn fanotify_mark(
|
||||
dirfd: fd_t,
|
||||
pathname: ?[*:0]const u8,
|
||||
) usize {
|
||||
return syscall5(
|
||||
.fanotify_mark,
|
||||
@bitCast(@as(isize, fd)),
|
||||
@as(u32, @bitCast(flags)),
|
||||
@bitCast(mask),
|
||||
@bitCast(@as(isize, dirfd)),
|
||||
@intFromPtr(pathname),
|
||||
);
|
||||
if (usize_bits < 64) {
|
||||
const mask_halves = splitValue64(@bitCast(mask));
|
||||
return syscall6(
|
||||
.fanotify_mark,
|
||||
@bitCast(@as(isize, fd)),
|
||||
@as(u32, @bitCast(flags)),
|
||||
mask_halves[0],
|
||||
mask_halves[1],
|
||||
@bitCast(@as(isize, dirfd)),
|
||||
@intFromPtr(pathname),
|
||||
);
|
||||
} else {
|
||||
return syscall5(
|
||||
.fanotify_mark,
|
||||
@bitCast(@as(isize, fd)),
|
||||
@as(u32, @bitCast(flags)),
|
||||
@bitCast(mask),
|
||||
@bitCast(@as(isize, dirfd)),
|
||||
@intFromPtr(pathname),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn name_to_handle_at(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user