lib:util: Always include unistd.h for setgroups
authorAndreas Schneider <asn@samba.org>
Tue, 20 Nov 2018 09:37:01 +0000 (10:37 +0100)
committerGary Lockyer <gary@samba.org>
Thu, 22 Nov 2018 21:13:27 +0000 (22:13 +0100)
This is needed to pass configure checks

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/util/setid.c

index eb75110..1001461 100644 (file)
@@ -34,6 +34,9 @@
 #include <sys/types.h>
 #include <errno.h>
 
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
 #ifdef HAVE_SYS_PRIV_H
 #include <sys/priv.h>
 #endif
@@ -57,9 +60,6 @@ int samba_setgroups(size_t setlen, const gid_t *gidset);
 #endif
 
 #if defined(HAVE_LINUX_THREAD_CREDENTIALS)
-#if defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
 #if defined(HAVE_SYSCALL_H)
 #include <syscall.h>
 #endif