zig
zig copied to clipboard
std.os: getauxval wrapper
cc @Vexu 🙂
@devnexen what are you working on? are you using this for anything?
- This getauxval wrapper allows to query the auxiliary vector for both Linux and FreeBSD.
- Other libraries tend to do the same like here.
- Tested with the following `const std = @import("std");
pub fn main() !void { const key: u32 = std.c.AT.EXECPATH; var r = try std.os.getauxval(key); std.debug.print("{}\n", .{@intToPtr(*const u8, r)}); }`