mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
std.process: Fix getBaseAddress() to handle all Darwin OSs.
This commit is contained in:
parent
d56a99442b
commit
b9efdbb412
1 changed files with 1 additions and 1 deletions
|
|
@ -1660,7 +1660,7 @@ pub fn getBaseAddress() usize {
|
|||
const phdr = getauxval(std.elf.AT_PHDR);
|
||||
return phdr - @sizeOf(std.elf.Ehdr);
|
||||
},
|
||||
.macos => {
|
||||
.driverkit, .ios, .macos, .tvos, .visionos, .watchos => {
|
||||
return @intFromPtr(&std.c._mh_execute_header);
|
||||
},
|
||||
.windows => return @intFromPtr(windows.kernel32.GetModuleHandleW(null)),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue