mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
std.os.linux.mmap: remove logic that does not belong here
This commit is contained in:
parent
601f632c27
commit
2c5113f6d1
@ -899,10 +899,6 @@ pub fn umount2(special: [*:0]const u8, flags: u32) usize {
|
||||
|
||||
pub fn mmap(address: ?[*]u8, length: usize, prot: usize, flags: MAP, fd: i32, offset: i64) usize {
|
||||
if (@hasField(SYS, "mmap2")) {
|
||||
// Make sure the offset is also specified in multiples of page size
|
||||
if ((offset & (MMAP2_UNIT - 1)) != 0)
|
||||
return @bitCast(-@as(isize, @intFromEnum(E.INVAL)));
|
||||
|
||||
return syscall6(
|
||||
.mmap2,
|
||||
@intFromPtr(address),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user