std.os.linux.mmap: remove logic that does not belong here

This commit is contained in:
Andrew Kelley 2025-02-03 21:41:12 -08:00
parent 601f632c27
commit 2c5113f6d1

View File

@ -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),