From f902964546f8184e84e15e4100c27770bec15d8b Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sun, 28 Dec 2025 10:58:02 -0800 Subject: [PATCH] define libc.getenv --- mod.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod.zig b/mod.zig index b54249ed786e304770df846d6891a313d80b1589..278ef10cddd5131b2512e9dbaa11cd4b43bb2821 100644 --- a/mod.zig +++ b/mod.zig @@ -1342,6 +1342,10 @@ pub const libc = struct { /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getegid.html pub extern fn getegid() gid_t; + /// char *getenv(const char *name); + /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getenv.html + pub extern fn getenv(name: [*:0]const u8) ?[*:0]u8; + /// uid_t geteuid(void); /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/geteuid.html pub extern fn geteuid() uid_t; -- 2.54.0