master
c 16 lines 501 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 #include "../libnetdata.h"
4
5 int os_getgrouplist(const char *username __maybe_unused, gid_t gid __maybe_unused, gid_t *supplementary_groups __maybe_unused, int *ngroups __maybe_unused) {
6 #if defined(OS_LINUX) || defined(OS_FREEBSD)
7 return getgrouplist(username, gid, supplementary_groups, ngroups);
8 #endif
9
10 #if defined(OS_MACOS)
11 return getgrouplist(username, gid, (int *)supplementary_groups, ngroups);
12 #endif
13
14 errno = ENOSYS;
15 return -1;
16 }