From 11da7a46091d579d1c2e7539f74f797e9d96ba4c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 5 Jun 2011 14:31:51 +0200 Subject: [PATCH 1/1] setenv: Avoid gcc warning. * lib/setenv.c (setenv): Provide declaration if system lacks it. (cherry picked from commit c00787b642cb499896ae03a918f13546d24b6552) --- ChangeLog | 5 +++++ lib/setenv.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index dd2b6ca14..b8bfb2be5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-06-05 Bruno Haible + setenv: Avoid gcc warning. + * lib/setenv.c (setenv): Provide declaration if system lacks it. + +2011-06-05 Bruno Haible + sys_select: Ensure memset is declared also on AIX 7. * lib/sys_select.in.h: Include also on AIX. * doc/posix-headers/sys_select.texi: Mention that is not diff --git a/lib/setenv.c b/lib/setenv.c index 173d95f28..0a5f67dd0 100644 --- a/lib/setenv.c +++ b/lib/setenv.c @@ -350,6 +350,9 @@ weak_alias (__clearenv, clearenv) #if HAVE_SETENV # undef setenv +# if !HAVE_DECL_SETENV +extern int setenv (const char *, const char *, int); +# endif # define STREQ(a, b) (strcmp (a, b) == 0) int -- 2.11.0