X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/4acbfa2ade4b81fbc5af5bc30f97b9feb9a40545..54bf456e8584eac5b0afdf8f7e003c79aa87ffe8:/getgroups.c diff --git a/getgroups.c b/getgroups.c index 7d681d16..3aa152fc 100644 --- a/getgroups.c +++ b/getgroups.c @@ -26,7 +26,13 @@ #include "rsync.h" -int main(int argc, char *argv[]) +#ifndef NGROUPS +/* It ought to be defined, but just in case. */ +# define NGROUPS 32 +#endif + +int +main(UNUSED(int argc), UNUSED(char *argv[])) { int n, i; gid_t list[NGROUPS]; @@ -37,7 +43,7 @@ int main(int argc, char *argv[]) } for (i = 0; i < n; i++) - printf("%u ", list[i]); + printf("%lu ", (unsigned long)list[i]); printf("\n"); return 0;