summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/misc/s6-linux-init-logouthookd.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/misc/s6-linux-init-logouthookd.c b/src/misc/s6-linux-init-logouthookd.c
index cc542ba..2b03f48 100644
--- a/src/misc/s6-linux-init-logouthookd.c
+++ b/src/misc/s6-linux-init-logouthookd.c
@@ -2,9 +2,7 @@
#include <skalibs/sysdeps.h>
-#ifndef SKALIBS_HASSOPEERCRED
-#error "The SO_PEERCRED option to getsockopt() is required."
-#endif
+#ifdef SKALIBS_HASSOPEERCRED
#include <skalibs/nonposix.h>
@@ -67,3 +65,13 @@ int main (void)
if (!pututxline(utx)) strerr_diefu1sys(111, "pututxline") ;
return 0 ;
}
+
+#else
+
+ /* Only Linux needs a real implementation */
+
+int main (void)
+{
+}
+
+#endif