From de98cb758bf84e22be0f7858bf506861bd622c32 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Fri, 29 Nov 2024 09:34:42 +0300 Subject: [PATCH] source3/lib/util_sec.c: include for setgroups setgroups(), unlike getgroups(), is not in but in . Recent compilers require function declaration before using a function (or more and more distributions treat lack of declaration as error), so all configure-time tests fails with source3/lib/util_sec.c: source3/../lib/util/setid.c: In function 'samba_setgroups': source3/../lib/util/setid.c:244:16: error: implicit declaration of function \ 'setgroups'; did you mean 'getgroups'? [-Wimplicit-function-declaration] 244 | return setgroups(setlen, gidset); Add the missing include so configuration finds the existing system functions instead of failing. Signed-off-by: Michael Tokarev Gbp-Pq: Name source3-lib-util_sec.c-include-grp.h-for-setgroups.patch --- source3/lib/util_sec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c index 5569df4e..91b728b6 100644 --- a/source3/lib/util_sec.c +++ b/source3/lib/util_sec.c @@ -28,6 +28,9 @@ #if defined(HAVE_UNISTD_H) #include #endif +#if defined(HAVE_GRP_H) +#include /* setgroups() */ +#endif #include #include #include -- 2.30.2