# HG changeset patch # User Bruno Haible # Date 1307277176 -7200 # Node ID 355e7137b2def81c304337e18f63a357ede270ee # Parent 0d4d726862cad8b7a9e1378a8ffea8e5097d6d14 unsetenv: Avoid gcc warning. * lib/unsetenv.c (unsetenv): Provide declaration if system lacks it. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-06-05 Bruno Haible + + unsetenv: Avoid gcc warning. + * lib/unsetenv.c (unsetenv): Provide declaration if system lacks it. + 2011-06-05 Bruno Haible setenv: Avoid gcc warning. diff --git a/lib/unsetenv.c b/lib/unsetenv.c --- a/lib/unsetenv.c +++ b/lib/unsetenv.c @@ -97,6 +97,13 @@ #else /* HAVE_UNSETENV */ # undef unsetenv +# if !HAVE_DECL_UNSETENV +# if VOID_UNSETENV +extern void unsetenv (const char *); +# else +extern int unsetenv (const char *); +# endif +# endif /* Call the underlying unsetenv, in case there is hidden bookkeeping that needs updating beyond just modifying environ. */