summaryrefslogtreecommitdiff
path: root/src/include/grp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/grp.h')
-rw-r--r--src/include/grp.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/include/grp.h b/src/include/grp.h
new file mode 100644
index 0000000..4516a19
--- /dev/null
+++ b/src/include/grp.h
@@ -0,0 +1,27 @@
+/* ISC license. */
+
+/*
+ This file is part of the nsss package.
+ See https://skarnet.org/software/nsss/
+*/
+
+#ifndef GRP_H
+#define GRP_H
+
+#include <nsss/grp.h>
+
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#include <sys/types.h>
+extern int getgrouplist (char const *, gid_t, gid_t *, int *) ;
+extern int setgroups (size_t, gid_t const *) ;
+extern int initgroups (char const *, gid_t) ;
+#endif
+
+#ifdef _GNU_SOURCE
+#include <stdio.h>
+extern struct group *fgetgrent (FILE *) ;
+extern int fgetgrent_r (FILE *, struct group *, char *, size_t, struct group **) ;
+extern int putgrent (struct group const *, FILE *) ;
+#endif
+
+#endif