Change fcntl params to ?*c_void

As recommended by LemonBoy
master
LeRoyce Pearson 2020-03-16 21:50:52 -06:00
parent 819537d70a
commit 4532f5ecad
2 changed files with 3 additions and 3 deletions

View File

@ -1147,7 +1147,7 @@ pub const LockCmd = enum {
};
/// Attempts to get lock the file, blocking if the file is locked.
pub fn fcntlFlock(fd: fd_t, lock_cmd: LockCmd, flock_p: *const Flock) OpenError!void {
pub fn fcntlFlock(fd: fd_t, lock_cmd: LockCmd, flock_p: *Flock) OpenError!void {
const cmd: i32 = cmdval: {
switch (lock_cmd) {
.GetLock => break :cmdval F_GETLK,

View File

@ -219,8 +219,8 @@ pub fn mmap(address: ?[*]u8, length: usize, prot: usize, flags: u32, fd: i32, of
}
}
pub fn fcntl(fd: fd_t, cmd: i32, flock_p: *const c_void) usize {
return syscall3(SYS_fcntl, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, cmd)), @ptrToInt(flock_p));
pub fn fcntl(fd: fd_t, cmd: i32, arg: ?*c_void) usize {
return syscall3(SYS_fcntl, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, cmd)), @ptrToInt(arg));
}
pub fn mprotect(address: [*]const u8, length: usize, protection: usize) usize {