aboutsummaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-02-14 23:38:14 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-02-14 23:38:14 -0500
commit71d7100aa830652490d3995bf4e1319f31b5e647 (patch)
treeff2d2740d61e34c063bf36825082cacb8b50d6c3 /std
parente025c70166d96d7a75a5039415321745f51f1f58 (diff)
downloadzig-71d7100aa830652490d3995bf4e1319f31b5e647.tar.gz
zig-71d7100aa830652490d3995bf4e1319f31b5e647.zip
darwin: fix pointer cast in mmap
Diffstat (limited to 'std')
-rw-r--r--std/os/darwin.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/std/os/darwin.zig b/std/os/darwin.zig
index c64ce807b6..3e883abbab 100644
--- a/std/os/darwin.zig
+++ b/std/os/darwin.zig
@@ -665,7 +665,7 @@ pub fn pwrite(fd: i32, buf: [*]const u8, nbyte: usize, offset: u64) usize {
pub fn mmap(address: ?[*]u8, length: usize, prot: usize, flags: u32, fd: i32, offset: isize) usize {
const ptr_result = c.mmap(
- @ptrCast(*c_void, address),
+ @ptrCast(?*c_void, address),
length,
@bitCast(c_int, @intCast(c_uint, prot)),
@bitCast(c_int, c_uint(flags)),