diff options
author | Tamir Duberstein <tamird@gmail.com> | 2017-01-24 19:54:18 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2017-01-25 19:24:32 (GMT) |
commit | 0874b648e050c3503a4944963aa83bbb4cd414d6 (patch) | |
tree | bc975286577541e2b4030a3730b5078d6e1eed16 /src/jemalloc.c | |
parent | c0cc5db8717dd1d890bd52b687d9eef64a49554f (diff) | |
download | jemalloc-0874b648e050c3503a4944963aa83bbb4cd414d6.zip jemalloc-0874b648e050c3503a4944963aa83bbb4cd414d6.tar.gz jemalloc-0874b648e050c3503a4944963aa83bbb4cd414d6.tar.bz2 |
Avoid redeclaring glibc's secure_getenv
Avoid the name secure_getenv to avoid redeclaring secure_getenv when
secure_getenv is present but its use is manually disabled via
ac_cv_func_secure_getenv=no.
Diffstat (limited to 'src/jemalloc.c')
-rw-r--r-- | src/jemalloc.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c index a9a7497..d0c8c03 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -709,17 +709,19 @@ stats_print_atexit(void) { * Begin initialization functions. */ -#ifndef JEMALLOC_HAVE_SECURE_GETENV static char * -secure_getenv(const char *name) { +jemalloc_secure_getenv(const char *name) { +#ifdef JEMALLOC_HAVE_SECURE_GETENV + return secure_getenv(name); +#else # ifdef JEMALLOC_HAVE_ISSETUGID if (issetugid() != 0) { return NULL; } # endif return getenv(name); -} #endif +} static unsigned malloc_ncpus(void) { @@ -908,7 +910,7 @@ malloc_conf_init(void) { #endif ; - if ((opts = secure_getenv(envname)) != NULL) { + if ((opts = jemalloc_secure_getenv(envname)) != NULL) { /* * Do nothing; opts is already initialized to * the value of the MALLOC_CONF environment |