about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-21 10:16:51 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-21 10:16:51 +0000
commite293f0b6ba0bb3a677e369ef161a92338051af77 (patch)
treec35254ee1e3033fa8f907b846d08f98ccf73add5
parentd0dde75587dbb7a041d270559a90267fc986992c (diff)
downloadnsss-e293f0b6ba0bb3a677e369ef161a92338051af77.tar.gz
nsss-e293f0b6ba0bb3a677e369ef161a92338051af77.tar.xz
nsss-e293f0b6ba0bb3a677e369ef161a92338051af77.zip
Don't declare setgroups() in grp.h if non-GNU
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--src/include/nsss/grp.h2
1 files changed, 1 insertions, 1 deletions
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 <sys/types.h>
 extern int setgroups (size_t, gid_t const *) ;
 extern int initgroups (char const *, gid_t) ;