]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Resolve new build warnings on macOS (Issue #4881)
authorMichael Sweet <michael.r.sweet@gmail.com>
Wed, 21 Sep 2016 16:55:51 +0000 (12:55 -0400)
committerMichael Sweet <michael.r.sweet@gmail.com>
Wed, 21 Sep 2016 16:55:51 +0000 (12:55 -0400)
scheduler/auth.c

index 2af443d516b6b8e7d8015d99ac7ff80eeaf21738..a73a1e09da0f2d533e56e51bb3a04f486d215ddd 100644 (file)
@@ -1180,10 +1180,18 @@ cupsdCheckGroup(
     if (user)
     {
       int      ngroups;                /* Number of groups */
+#  ifdef __APPLE__
+      int      groups[2048];           /* Groups that user belongs to */
+#  else
       gid_t    groups[2048];           /* Groups that user belongs to */
+#  endif /* __APPLE__ */
 
       ngroups = (int)(sizeof(groups) / sizeof(groups[0]));
+#  ifdef __APPLE__
+      getgrouplist(username, (int)user->pw_gid, groups, &ngroups);
+#  else
       getgrouplist(username, user->pw_gid, groups, &ngroups);
+#endif /* __APPLE__ */
 
       for (i = 0; i < ngroups; i ++)
         if (group->gr_gid == groups[i])