summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/skalibs/nonposix.h9
-rw-r--r--src/include/skalibs/stddjb.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/src/include/skalibs/nonposix.h b/src/include/skalibs/nonposix.h
index 7f064d5..3ef4e99 100644
--- a/src/include/skalibs/nonposix.h
+++ b/src/include/skalibs/nonposix.h
@@ -53,6 +53,15 @@
#endif
+ /* Unfortunately we can't fully avoid #ifdef forests,
+ because the BSDs are bloody snowflakes. See: setgroups(). */
+
+#undef SKALIBS_BSD_SUCKS
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__)
+# define SKALIBS_BSD_SUCKS
+#endif
+
+
/* old versions of BSD and some broken GNU toolchains:
system headers are not self-contained,
starting with sys/types.h normally always works. */
diff --git a/src/include/skalibs/stddjb.h b/src/include/skalibs/stddjb.h
index 1a2ccca..50e07c5 100644
--- a/src/include/skalibs/stddjb.h
+++ b/src/include/skalibs/stddjb.h
@@ -10,7 +10,6 @@
#include <skalibs/types.h>
#include <skalibs/error.h>
#include <skalibs/ip46.h>
-#include <skalibs/setgroups.h>
#include <skalibs/alarm.h>
#include <skalibs/alloc.h>
@@ -45,6 +44,7 @@
#include <skalibs/nsig.h>
#include <skalibs/segfault.h>
#include <skalibs/selfpipe.h>
+#include <skalibs/setgroups.h>
#include <skalibs/sgetopt.h>
#include <skalibs/sig.h>
#include <skalibs/siovec.h>