aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/c.zig')
-rw-r--r--lib/std/c.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/std/c.zig b/lib/std/c.zig
index 6e1e9beb9f..4627f4103e 100644
--- a/lib/std/c.zig
+++ b/lib/std/c.zig
@@ -7867,6 +7867,11 @@ pub const MAP = switch (native_os) {
else => void,
};
+pub const MREMAP = switch (native_os) {
+ .linux => linux.MREMAP,
+ else => void,
+};
+
/// Used by libc to communicate failure. Not actually part of the underlying syscall.
pub const MAP_FAILED: *anyopaque = @ptrFromInt(maxInt(usize));
@@ -9508,6 +9513,7 @@ pub extern "c" fn write(fd: fd_t, buf: [*]const u8, nbyte: usize) isize;
pub extern "c" fn pwrite(fd: fd_t, buf: [*]const u8, nbyte: usize, offset: off_t) isize;
pub extern "c" fn mmap(addr: ?*align(page_size) anyopaque, len: usize, prot: c_uint, flags: MAP, fd: fd_t, offset: off_t) *anyopaque;
pub extern "c" fn munmap(addr: *align(page_size) const anyopaque, len: usize) c_int;
+pub extern "c" fn mremap(addr: ?*align(page_size) const anyopaque, old_len: usize, new_len: usize, flags: MREMAP, ...) *anyopaque;
pub extern "c" fn mprotect(addr: *align(page_size) anyopaque, len: usize, prot: c_uint) c_int;
pub extern "c" fn link(oldpath: [*:0]const u8, newpath: [*:0]const u8) c_int;
pub extern "c" fn linkat(oldfd: fd_t, oldpath: [*:0]const u8, newfd: fd_t, newpath: [*:0]const u8, flags: c_int) c_int;