Testsuite: tidying
[users/jgh/exim.git] / src / src / exim.c
index 8105d4dddba7584a91d6992c7105bec8aa245c2e..81b7bdc9f48686dda5616fccffee9b5677f06674 100644 (file)
@@ -23,6 +23,10 @@ Also a few functions that don't naturally fit elsewhere. */
 # endif
 #endif
 
+#ifndef _TIME_H
+# include <time.h>
+#endif
+
 extern void init_lookup_list(void);
 
 
@@ -3638,7 +3642,11 @@ since you have to be root to run it, even if throwing away groups. Not being
 root here happens only in some unusual configurations. We just ignore the
 error. */
 
-if (setgroups(0, NULL) != 0 && setgroups(1, group_list) != 0 && !unprivileged)
+if (
+#ifndef OS_SETGROUPS_ZERO_DROPS_ALL
+   setgroups(0, NULL) != 0 &&
+#endif
+   setgroups(1, group_list) != 0 && !unprivileged)
   exim_fail("exim: setgroups() failed: %s\n", strerror(errno));
 
 /* If the configuration file name has been altered by an argument on the