diff options
Diffstat (limited to 'src/core/support/env_linux.c')
-rw-r--r-- | src/core/support/env_linux.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/support/env_linux.c b/src/core/support/env_linux.c index 442cd8298e..1ca6fa1aff 100644 --- a/src/core/support/env_linux.c +++ b/src/core/support/env_linux.c @@ -52,6 +52,7 @@ #include "src/core/support/string.h" char *gpr_getenv(const char *name) { +#if defined(GPR_BACKWARDS_COMPATIBILITY_MODE) typedef char *(*getenv_type)(const char *); static getenv_type getenv_func = NULL; /* Check to see which getenv variant is supported (go from most @@ -62,6 +63,10 @@ char *gpr_getenv(const char *name) { } char *result = getenv_func(name); return result == NULL ? result : gpr_strdup(result); +#else + char *result = secure_getenv(name); + return result == NULL ? result : gpr_strdup(result); +#endif } void gpr_setenv(const char *name, const char *value) { |