logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git
commit: fc9b143e54c37542192761d6e405b5a93d07fbeb
parent 85ca7f6ac5438486be9fd7bfe2eec2fdaa529b57
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 12 Feb 2023 11:07:41 +0100

cmd/id: Add OS notes about getgrouplist

Diffstat:

Mcmd/id.c6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmd/id.c b/cmd/id.c @@ -3,14 +3,14 @@ // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only #define _POSIX_C_SOURCE 200809L -#define _DEFAULT_SOURCE // getgrouplist -#include <grp.h> // getgrgid, getgroups, getgrouplist +#define _DEFAULT_SOURCE // getgrouplist (4.4BSD+) +#include <grp.h> // getgrgid, getgroups, getgrouplist(glibc) #include <pwd.h> // getpwuid #include <stdbool.h> // bool #include <stdio.h> // printf, perror #include <stdlib.h> // malloc, free #include <sys/types.h> // uid_t -#include <unistd.h> // getuid, getgid, getopt, opt* +#include <unistd.h> // getuid, getgid, getopt, opt*, getgrouplist(FreeBSD, NetBSD) bool name_flag = false;