Commit 29fb9e4da7

Alex Rønne Petersen <alex@alexrp.com>
2025-10-17 02:46:47
std.os.linux.tls: don't unnecessarily use std.posix
1 parent d5481e6
Changed files (1)
lib
std
os
linux
lib/std/os/linux/tls.zig
@@ -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")) {