diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | system.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 6b2f5fe70..8161dc266 100644 --- a/configure.ac +++ b/configure.ac @@ -521,7 +521,7 @@ AC_CHECK_FUNCS(fdatasync) AC_REPLACE_FUNCS(stpcpy stpncpy) -AC_CHECK_FUNCS(__secure_getenv) +AC_CHECK_FUNCS([secure_getenv __secure_getenv]) AC_CHECK_FUNCS( [mkstemp getcwd basename dirname realpath setenv unsetenv regcomp lchown], @@ -35,7 +35,9 @@ char * stpcpy(char * dest, const char * src); char * stpncpy(char * dest, const char * src, size_t n); #endif -#if HAVE___SECURE_GETENV +#if HAVE_SECURE_GETENV +#define getenv(_s) secure_getenv(_s) +#elif HAVE___SECURE_GETENV #define getenv(_s) __secure_getenv(_s) #endif |