diff options
Diffstat (limited to 'otherlibs/unix')
-rw-r--r-- | otherlibs/unix/getgroups.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/otherlibs/unix/getgroups.c b/otherlibs/unix/getgroups.c index 6ce250d5a..3e4242672 100644 --- a/otherlibs/unix/getgroups.c +++ b/otherlibs/unix/getgroups.c @@ -18,17 +18,20 @@ #ifdef HAS_GETGROUPS #include <sys/types.h> -#include <sys/param.h> +#ifdef HAS_UNISTD +#include <unistd.h> +#endif +#include <limits.h> #include "unixsupport.h" value unix_getgroups(value unit) /* ML */ { - gid_t gidset[NGROUPS]; + gid_t gidset[NGROUPS_MAX]; int n; value res; int i; - n = getgroups(NGROUPS, gidset); + n = getgroups(NGROUPS_MAX, gidset); if (n == -1) uerror("getgroups", Nothing); res = alloc_tuple(n); for (i = 0; i < n; i++) |