# HG changeset patch # User Eric Blake # Date 1224848180 21600 # Node ID 829e51d54702099791814d0a62ae3c93778a76e8 # Parent 6dbc82e85edc020f68e5e21f153479d256bf782f getgroups: fix compilation when getgroups is available * lib/getgroups.c (includes): Include for getgroups, but with override of getgroups disabled. Signed-off-by: Eric Blake diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-24 Eric Blake + + getgroups: fix compilation when getgroups is available + * lib/getgroups.c (includes): Include for getgroups, + but with override of getgroups disabled. + 2008-10-24 Simon Josefsson * doc/gnulib.texi (Header files): Add note about C++ problems. diff --git a/lib/getgroups.c b/lib/getgroups.c --- a/lib/getgroups.c +++ b/lib/getgroups.c @@ -1,6 +1,7 @@ /* provide consistent interface to getgroups for systems that don't allow N==0 - Copyright (C) 1996, 1999, 2003, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 1996, 1999, 2003, 2006, 2007, 2008 Free Software + Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,10 +20,13 @@ #include +#undef getgroups + #include #include #include #include +#include #include "xalloc.h" @@ -38,8 +42,6 @@ GETGROUPS_T *gbuf; int saved_errno; -#undef getgroups - if (n != 0) return getgroups (n, group);