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.
This commit is contained in:
parent
c0cc5db871
commit
0874b648e0
@ -709,17 +709,19 @@ stats_print_atexit(void) {
|
|||||||
* Begin initialization functions.
|
* Begin initialization functions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef JEMALLOC_HAVE_SECURE_GETENV
|
|
||||||
static char *
|
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
|
# ifdef JEMALLOC_HAVE_ISSETUGID
|
||||||
if (issetugid() != 0) {
|
if (issetugid() != 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
return getenv(name);
|
return getenv(name);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static unsigned
|
static unsigned
|
||||||
malloc_ncpus(void) {
|
malloc_ncpus(void) {
|
||||||
@ -908,7 +910,7 @@ malloc_conf_init(void) {
|
|||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
if ((opts = secure_getenv(envname)) != NULL) {
|
if ((opts = jemalloc_secure_getenv(envname)) != NULL) {
|
||||||
/*
|
/*
|
||||||
* Do nothing; opts is already initialized to
|
* Do nothing; opts is already initialized to
|
||||||
* the value of the MALLOC_CONF environment
|
* the value of the MALLOC_CONF environment
|
||||||
|
Loading…
Reference in New Issue
Block a user