Meili C 0f17cbfc6a fix: allow std.linux.getgroups to accept null
looking at `man getgroups` and `info getgroups` this is given as an
example:

  ```c
       // Here's how to use ‘getgroups’ to read all the supplementary group
       // IDs:

            gid_t *
            read_all_groups (void)
            {
              int ngroups = getgroups (0, NULL);
              gid_t *groups
                = (gid_t *) xmalloc (ngroups * sizeof (gid_t));
              int val = getgroups (ngroups, groups);
              if (val < 0)
                {
                  free (groups);
                  return NULL;
                }
              return groups;
            }
  ```

getgroups(0, NULL) is used to get the count of groups so that the
correct count can be used to allocate a list of gid_t. This small changes makes this
possible.

equivalent example in Zig after the change:

  ```zig
    // get the group count
    const ngroups: usize = std.os.linux.getgroups(0, null);
    if (ngroups <= 0) {
        return error.GetGroupsError;
    }

    std.debug.print("number of groups: {d}\n", .{ngroups});
    const groups_gids: []u32 = try alloc.alloc(u32, ngroups);

    // populate an array of gid_t
    _ = std.os.linux.getgroups(ngroups, @ptrCast(groups_gids));
  ```
2024-12-22 21:48:47 +01:00
..
2024-12-16 20:56:29 -05:00
2024-12-15 03:40:20 -08:00
2024-12-18 05:30:08 -05:00
2024-02-23 02:37:11 -07:00
2024-07-23 11:43:12 -07:00
2024-07-09 14:25:42 -07:00
2024-03-10 18:13:30 -07:00
2024-08-22 08:44:08 +02:00
2024-08-29 20:39:11 +01:00
2024-03-21 14:11:46 -07:00
2024-11-01 02:04:27 +03:30
2024-08-07 00:48:32 -07:00
2024-11-25 14:18:55 -08:00
2024-07-31 16:57:42 -07:00
2024-11-22 15:30:07 -08:00
2024-07-19 00:30:32 -07:00
2024-07-19 00:30:32 -07:00
2024-08-29 23:43:52 +01:00
2024-07-09 14:25:42 -07:00
2024-10-23 13:47:44 -07:00
2024-12-13 13:24:38 +01:00
2024-06-17 16:12:19 -04:00