aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-03-07 21:40:55 +0100
committerFlorian Weimer <fweimer@redhat.com>2025-03-07 21:40:55 +0100
commit6ef0bd02dbe34aab8b956ffa2db5679341d520f5 (patch)
treeb73958ffe535e02cefae47e3d3086e4dc7edd17a /posix
parent77261698b4e938020a1b2032709a54d942ba330f (diff)
downloadglibc-6ef0bd02dbe34aab8b956ffa2db5679341d520f5.tar.xz
glibc-6ef0bd02dbe34aab8b956ffa2db5679341d520f5.zip
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 <hjl.tools@gmail.com>
Diffstat (limited to 'posix')
-rw-r--r--posix/environ.c4
1 files changed, 4 insertions, 0 deletions
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 <unistd.h>
#include <stddef.h>
+#include <stdlib/setenv.h>
/* 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;