From 4bf4867ea51b59673a9118c66c3ee2cfd8e71d91 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 24 Oct 2008 05:36:20 -0600 Subject: [PATCH] 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 --- ChangeLog | 6 ++++++ lib/getgroups.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c32c1ebe8..b59412e96 100644 --- 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 index a8a225a8f..1e9cbc649 100644 --- 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 @@ rpl_getgroups (int n, GETGROUPS_T *group) GETGROUPS_T *gbuf; int saved_errno; -#undef getgroups - if (n != 0) return getgroups (n, group); -- 2.11.0