From 55098ff6eccaa1cbb4d8bd788e40927657fbd509 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 29 Oct 2014 10:54:40 -0600 Subject: [PATCH] Mark the putenv(), setenv() and unsetenv() symbols as global, not hidden. Fixes a mismatch where a plugin (or its loaded dso) would call setenv() to set a variables but be unable to find it later with getenv(). --- src/env_hooks.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/env_hooks.c b/src/env_hooks.c index 3a41d1731..fd1e37848 100644 --- a/src/env_hooks.c +++ b/src/env_hooks.c @@ -76,9 +76,7 @@ getenv_unhooked(const char *name) return rpl_getenv(name); } -__dso_public char *getenv(const char *); - -char * +__dso_public char * getenv(const char *name) { char *val = NULL; @@ -148,7 +146,7 @@ putenv_unhooked(PUTENV_CONST char *string) return rpl_putenv(string); } -int +__dso_public int putenv(PUTENV_CONST char *string) { switch (process_hooks_putenv((char *)string)) { @@ -216,7 +214,7 @@ setenv_unhooked(const char *var, const char *val, int overwrite) return rpl_setenv(var, val, overwrite); } -int +__dso_public int setenv(const char *var, const char *val, int overwrite) { switch (process_hooks_setenv(var, val, overwrite)) { @@ -281,9 +279,9 @@ unsetenv_unhooked(const char *var) } #ifdef UNSETENV_VOID -void +__dso_public void #else -int +__dso_public int #endif unsetenv(const char *var) { -- 2.40.0