aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/env.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-04-30 17:46:14 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-04-30 17:46:14 -0700
commit58d7c4b388067771e0ce1cf0dffd376c6b7fb9f2 (patch)
tree1e6f3d780cdfe1c6f5ca35bd4b2787ce907f9682 /src/env.cpp
parenta897ef002521a3991adc4342189f0e30a0d048b0 (diff)
Remove use of __environ
It has apparently never worked. Fixes #2988
Diffstat (limited to 'src/env.cpp')
-rw-r--r--src/env.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/env.cpp b/src/env.cpp
index 40af30bf..e4829a46 100644
--- a/src/env.cpp
+++ b/src/env.cpp
@@ -45,8 +45,6 @@
/// At init, we read all the environment variables from this array.
extern char **environ;
-/// This should be the same thing as \c environ, but it is possible only one of the two work...
-extern char **__environ;
bool g_log_forks = false;
bool g_use_posix_spawn = false; // will usually be set to true
@@ -311,7 +309,7 @@ void env_init(const struct config_paths_t *paths /* or NULL */) {
// Import environment variables. Walk backwards so that the first one out of any duplicates wins
// (#2784).
wcstring key, val;
- const char *const *envp = (environ ? environ : __environ);
+ const char *const *envp = environ;
size_t i = 0;
while (envp && envp[i]) {
i++;