check_function_exists(getgroups HAVE_GETGROUPS)
check_function_exists(setgroups HAVE_SETGROUPS)
+if (HAVE_SETGROUPS)
+ check_prototype_definition(setgroups
+ "int setgroups(int size, const gid_t *list)"
+ "-1"
+ "unistd.h"
+ HAVE_SETGROUPS_INT)
+endif (HAVE_SETGROUPS)
+
check_function_exists(syscall HAVE_SYSCALL)
if (HAVE_SYSCALL)
/* Define to 1 if you have the `setresgid' function. */
#cmakedefine HAVE_SETREGID 1
+/* Define to 1 if you have the `setgroups' function. */
+#cmakedefine HAVE_SETGROUPS 1
+#cmakedefine HAVE_SETGROUPS_INT 1
+
/* Define to 1 if you have the `syscall' function. */
#cmakedefine HAVE_SYSCALL 1
return rc;
}
+#ifdef HAVE_SETGROUPS_INT
+int setgroups(int size, const gid_t *list)
+#else
int setgroups(size_t size, const gid_t *list)
+#endif
{
if (!uwrap_enabled()) {
return uwrap.libc.fns._libc_setgroups(size, list);