std.os.linux.tls: don't unnecessarily use std.posix

This commit is contained in:
Alex Rønne Petersen 2025-10-17 02:46:47 +02:00
parent d5481e6536
commit 29fb9e4da7
No known key found for this signature in database

View File

@ -16,7 +16,6 @@ const math = std.math;
const assert = std.debug.assert;
const native_arch = @import("builtin").cpu.arch;
const linux = std.os.linux;
const posix = std.posix;
const page_size_min = std.heap.page_size_min;
/// Represents an ELF TLS variant.
@ -523,7 +522,7 @@ pub fn initStatic(phdrs: []elf.Phdr) void {
}
inline fn mmap_tls(length: usize) usize {
const prot = posix.PROT.READ | posix.PROT.WRITE;
const prot = linux.PROT.READ | linux.PROT.WRITE;
const flags: linux.MAP = .{ .TYPE = .PRIVATE, .ANONYMOUS = true };
if (@hasField(linux.SYS, "mmap2")) {