Once upon a time, Jakub Jelinek <jakub(a)redhat.com> said:
You haven't read the man page carefully:
SYNOPSIS
#include <sys/types.h>
#include <unistd.h>
int getgroups(int size, gid_t list[]);
#include <grp.h>
int setgroups(size_t size, const gid_t *list);
I.e. for getgroups you need sys/types.h and unistd.h and for setgroups
also grp.h.
Why is it done this way? The other OSes I have access to (Tru64
4.0G/5.1A and Solaris 9) don't require grp.h to get setgroups().
--
Chris Adams <cmadams(a)hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.