From 6ef0bd02dbe34aab8b956ffa2db5679341d520f5 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 7 Mar 2025 21:40:55 +0100 Subject: posix: Move environ helper variables next to environ definition (bug 32541) This helps with statically interposing getenv. Updates commit 7a61e7f557a97ab597d6fca5e2d1f13f65685c61 ("stdlib: Make getenv thread-safe in more cases"). Reviewed-by: H.J. Lu --- posix/environ.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'posix') diff --git a/posix/environ.c b/posix/environ.c index a0ed0d80ea..924effe3cd 100644 --- a/posix/environ.c +++ b/posix/environ.c @@ -2,6 +2,7 @@ #include #include +#include /* This must be initialized; we cannot have a weak alias into bss. */ char **__environ = NULL; @@ -10,3 +11,6 @@ weak_alias (__environ, environ) /* The SVR4 ABI says `_environ' will be the name to use in case the user overrides the weak alias `environ'. */ weak_alias (__environ, _environ) + +struct environ_array *__environ_array_list; +environ_counter __environ_counter; -- cgit v1.2.3