From e293f0b6ba0bb3a677e369ef161a92338051af77 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 21 Sep 2023 10:16:51 +0000 Subject: Don't declare setgroups() in grp.h if non-GNU Signed-off-by: Laurent Bercot --- src/include/nsss/grp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/nsss/grp.h b/src/include/nsss/grp.h index e26ae05..8e16467 100644 --- a/src/include/nsss/grp.h +++ b/src/include/nsss/grp.h @@ -69,7 +69,7 @@ extern "C" { do not conflict with nsss operation. */ -#if defined(_GNU_SOURCE) || defined(_DEFAULT_SOURCE) +#if defined(__GNU__) && (defined(_BSD_SOURCE) || defined(_DEFAULT_SOURCE)) #include extern int setgroups (size_t, gid_t const *) ; extern int initgroups (char const *, gid_t) ; -- cgit 1.4.1