summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-04-21 13:59:01 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2021-04-21 13:59:01 +0000
commit87f302d8f9fcca1af1a948841f5169281663fed6 (patch)
treeaf1bd020db82ae6dad27f4ec7ef4763a5cb6f1c3
parentdacf8817be3943b8911d290fb9cbaaa5d659ad95 (diff)
downloads6-linux-init-portable.tar.xz
Nop out logouthookd if no struct ucred, instead of erroring outportable
-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