summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2013-01-28 18:49:01 +0200
committerPanu Matilainen <pmatilai@redhat.com>2013-01-29 09:50:33 +0200
commit395d55add40037c9d8003195db5a1ad00747065c (patch)
tree8f52cbd8a0000158f0ecd082f1580cd102750c9e
parentba3b17b82a80a7f6ed141d6ce547f4cd25233c41 (diff)
downloadrpm-395d55add40037c9d8003195db5a1ad00747065c.tar.gz
Acommodate to glibc 2.17 __secure_getenv() renaming
- glibc 2.17 renames __secure_getenv() to secure_getenv() so now we need to test for both. Meh. (cherry picked from commit 49519f2564777fdcfb801088fb3025b3d6f5783a)
-rw-r--r--configure.ac2
-rw-r--r--system.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 19e32bc6d..e9aa84e93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -485,7 +485,7 @@ AC_CHECK_FUNCS(putenv)
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],
diff --git a/system.h b/system.h
index dd3573859..0037244f1 100644
--- a/system.h
+++ b/system.h
@@ -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