From: Michael Tokarev Date: Fri, 29 Nov 2024 06:34:42 +0000 (+0300) Subject: source3/lib/util_sec.c: include for setgroups X-Git-Tag: archive/raspbian/2%4.22.0+dfsg-1+rpi1^2^2^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=de98cb758bf84e22be0f7858bf506861bd622c32;p=samba.git 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 --- 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