summaryrefslogtreecommitdiff
path: root/getgroups.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-02-04 17:49:36 +0000
committerWayne Davison <wayned@samba.org>2004-02-04 17:49:36 +0000
commit1df395f7c211698420488a3f6600fd5cf50b7785 (patch)
tree0da20d64d22cd878df8d36a3f97dc131f09c8ad1 /getgroups.c
parent5fdf2e706396803f1738f54b7fd65723d39a0fcf (diff)
downloadrsync-1df395f7c211698420488a3f6600fd5cf50b7785.tar.gz
Use the new HAVE_GETGROUPS define.
Diffstat (limited to 'getgroups.c')
-rw-r--r--getgroups.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/getgroups.c b/getgroups.c
index 8dfe264c..8bb82f5d 100644
--- a/getgroups.c
+++ b/getgroups.c
@@ -39,10 +39,14 @@ main(UNUSED(int argc), UNUSED(char *argv[]))
gid_t gid = MY_GID();
int gid_in_list = 0;
+#ifdef HAVE_GETGROUPS
if ((n = getgroups(NGROUPS_MAX, list)) < 0) {
perror("getgroups");
return 1;
}
+#else
+ n = 0;
+#endif
for (i = 0; i < n; i++) {
printf("%lu ", (unsigned long)list[i]);