authorgravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-03-16 21:50:52-06:00
committergravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-03-16 21:50:52-06:00
log4532f5ecad23a3478310f159f43d31217c863c35
tree5270cd8825b004b308128224515d8ad76c01af3b
parent819537d70a3283737474e1b673fc20f574ac6bb6

Change fcntl params to ?*c_void

As recommended by LemonBoy

2 files changed, 3 insertions(+), 3 deletions(-)

lib/std/os.zig+1-1
......@@ -1147,7 +1147,7 @@ pub const LockCmd = enum {
11471147};
11481148
11491149/// Attempts to get lock the file, blocking if the file is locked.
1150pub fn fcntlFlock(fd: fd_t, lock_cmd: LockCmd, flock_p: *const Flock) OpenError!void {
1150pub fn fcntlFlock(fd: fd_t, lock_cmd: LockCmd, flock_p: *Flock) OpenError!void {
11511151 const cmd: i32 = cmdval: {
11521152 switch (lock_cmd) {
11531153 .GetLock => break :cmdval F_GETLK,
lib/std/os/linux.zig+2-2
......@@ -219,8 +219,8 @@ pub fn mmap(address: ?[*]u8, length: usize, prot: usize, flags: u32, fd: i32, of
219219 }
220220}
221221
222pub fn fcntl(fd: fd_t, cmd: i32, flock_p: *const c_void) usize {
223 return syscall3(SYS_fcntl, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, cmd)), @ptrToInt(flock_p));
222pub fn fcntl(fd: fd_t, cmd: i32, arg: ?*c_void) usize {
223 return syscall3(SYS_fcntl, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, cmd)), @ptrToInt(arg));
224224}
225225
226226pub fn mprotect(address: [*]const u8, length: usize, protection: usize) usize {