#ifdef _BSD_SOURCE (added in 78799a0c4861d8e5577b80952c7407bd002f7f9a) is never true during the build because _BSD_SOURCE is not defined.
The root cause for the implicit declaration of setgroups is in meson.build, where c_std=c11 is specified. This results in building with -std=c11, which turns on strict POSIX mode in glibc, so setgroups is no longer declared in <grp.h>.
You probably should not downgrade the C compiler defaults using -std=c11, or define _DEFAULT_SOURCE (and perhaps _BSD_SOURCE for really old glibc) at the start of setuid.c.
#ifdef _BSD_SOURCE
(added in 78799a0c4861d8e5577b80952c7407bd002f7f9a) is never true during the build because_BSD_SOURCE
is not defined.The root cause for the implicit declaration of
setgroups
is inmeson.build
, wherec_std=c11
is specified. This results in building with-std=c11
, which turns on strict POSIX mode in glibc, sosetgroups
is no longer declared in<grp.h>
.You probably should not downgrade the C compiler defaults using
-std=c11
, or define_DEFAULT_SOURCE
(and perhaps_BSD_SOURCE
for really old glibc) at the start ofsetuid.c
.