diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-15 18:24:54 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-15 18:24:54 +0100 |
| commit | 69e6fe89fa9baafeca3e3515bb50897cd8ee7c35 (patch) | |
| tree | 489046ce167b8b20d205f87f4ae1f4b680c19b43 /lib/libc/stdlib/getenv.c | |
| parent | 0d5bffe9d2caadc1215c875e560c52bca5161c54 (diff) | |
Add getauxval and cleanup libc startup
Diffstat (limited to 'lib/libc/stdlib/getenv.c')
| -rw-r--r-- | lib/libc/stdlib/getenv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdlib/getenv.c b/lib/libc/stdlib/getenv.c index 41517e2f..91cdc87b 100644 --- a/lib/libc/stdlib/getenv.c +++ b/lib/libc/stdlib/getenv.c @@ -7,7 +7,7 @@ extern char **environ; char *getenv(const char *name) { - LIBC_LOCK(libc.lock.environ); + LIBC_LOCK(__libc.lock.environ); for (char **env = environ; *env; env++) { char *eq = NULL; @@ -21,12 +21,12 @@ char *getenv(const char *name) } } if (eq && name[eq - *env] == '\0') { - LIBC_UNLOCK(libc.lock.environ); + LIBC_UNLOCK(__libc.lock.environ); return eq + 1; } } - LIBC_UNLOCK(libc.lock.environ); + LIBC_UNLOCK(__libc.lock.environ); return NULL; } |
