summaryrefslogtreecommitdiff
path: root/libiberty/setenv.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-03-17 19:04:25 +0000
committerEli Zaretskii <eliz@gnu.org>2013-03-17 19:04:25 +0000
commitcbe26203b8502fb71be7def3fa565e5a211e774c (patch)
tree71d62ac3d82065033cc4e99607f7244ccad7e027 /libiberty/setenv.c
parente2a5ecd6aa1e641e91b300313632e81ff42ce5de (diff)
downloadgdb-cbe26203b8502fb71be7def3fa565e5a211e774c.tar.gz
Fix compilation warning by MinGW GCC.
setenv.c [!HAVE_ENVIRON_DECL]: Avoid declaring environ if it is a macro, as this causes compiler warnings with MinGW.
Diffstat (limited to 'libiberty/setenv.c')
-rw-r--r--libiberty/setenv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libiberty/setenv.c b/libiberty/setenv.c
index 96917d5769f..921e9688601 100644
--- a/libiberty/setenv.c
+++ b/libiberty/setenv.c
@@ -63,8 +63,11 @@ extern int errno;
#define __environ environ
#ifndef HAVE_ENVIRON_DECL
+/* MinGW defines environ to call a function. */
+#ifndef environ
extern char **environ;
#endif
+#endif
#undef setenv
#undef unsetenv