From a6f605ed6dcfdf2ea7f6b0bf68e18d8c9ce5ea96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Tue, 5 Feb 2013 02:06:04 -0300 Subject: [PATCH] Test for secure_getenv too. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In current glibc versions, internal __secure_getenv no longer exists and was replaced by secure_getenv() Signed-off-by: Cristian Rodríguez --- configure.ac | 1 + lib/env.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) --- util-linux-2.21.2.orig/configure.ac +++ util-linux-2.21.2/configure.ac @@ -281,6 +281,7 @@ AC_CHECK_FUNCS( posix_fadvise \ getmntinfo \ __secure_getenv \ + secure_getenv \ warn \ warnx \ rpmatch]) --- util-linux-2.21.2.orig/lib/env.c +++ util-linux-2.21.2/lib/env.c @@ -98,8 +98,9 @@ char *safe_getenv(const char *arg) return NULL; #endif #endif - -#ifdef HAVE___SECURE_GETENV +#ifdef HAVE_SECURE_GETENV +return secure_getenv(arg); +#elif HAVE___SECURE_GETENV return __secure_getenv(arg); #else return getenv(arg);