From 58d7c4b388067771e0ce1cf0dffd376c6b7fb9f2 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 30 Apr 2016 17:46:14 -0700 Subject: Remove use of __environ It has apparently never worked. Fixes #2988 --- src/env.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/env.cpp') 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++; -- cgit v1.2.3