summaryrefslogtreecommitdiff
path: root/lib/et/error_message.c
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2014-06-12 12:07:34 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2014-06-12 12:07:34 +0100
commit485edc675200ff3097cec521c357441a1c2d9b0d (patch)
tree7edee2fc5e1fb60caa90f3bb26b1becde9691b99 /lib/et/error_message.c
parent1ab0ea88057e922a89c6b8feebeb62c57e40f8de (diff)
parent5f4b406b03dc9fa27c78184df5b1d501e373ca01 (diff)
downloade2fsprogs-485edc675200ff3097cec521c357441a1c2d9b0d.tar.gz
Merge 'baserock/richardmaw/yakshave/util-linux-blkid' into baserock/morphbaserock/morph
Reviewed-by: Lars Wirzenius Reviewed-by: Sam Thursfield
Diffstat (limited to 'lib/et/error_message.c')
-rw-r--r--lib/et/error_message.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/et/error_message.c b/lib/et/error_message.c
index dc77b69f..5d8d2422 100644
--- a/lib/et/error_message.c
+++ b/lib/et/error_message.c
@@ -17,6 +17,9 @@
*/
#include "config.h"
+#if HAVE_SECURE_GETENV
+#define _GNU_SOURCE
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -102,8 +105,7 @@ typedef char *(*gettextf) (const char *);
static gettextf com_err_gettext = NULL;
-gettextf set_com_err_gettext (new_proc)
- gettextf new_proc;
+gettextf set_com_err_gettext(gettextf new_proc)
{
gettextf x = com_err_gettext;
@@ -209,7 +211,9 @@ static char *safe_getenv(const char *arg)
#endif
#endif
-#ifdef HAVE___SECURE_GETENV
+#if defined(HAVE_SECURE_GETENV)
+ return secure_getenv(arg);
+#elif defined(HAVE___SECURE_GETENV)
return __secure_getenv(arg);
#else
return getenv(arg);