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

This commit is contained in:
Andrew Kelley committed 2025-02-06 14:23:23 -08:00
1 parent 601f632c27
commit 2c5113f6d1
1 file changed
-4
-4
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),