summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libs6/s6_svc_writectl.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libs6/s6_svc_writectl.c b/src/libs6/s6_svc_writectl.c
index c522923..11eaf0e 100644
--- a/src/libs6/s6_svc_writectl.c
+++ b/src/libs6/s6_svc_writectl.c
@@ -1,5 +1,6 @@
/* ISC license. */
+#include <skalibs/sysdeps.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
@@ -21,7 +22,10 @@ int s6_svc_writectl (char const *service, char const *subdir, char const *s, siz
r = s6_svc_write(fn, s, len) ;
if (r != -2) return r ;
- /* Now we need to investigate what went wrong... */
+#ifdef SKALIBS_HASODIRECTORY
+
+ /* Investigate what went wrong */
+
{
int fd, fdsub ;
fd = open(service, O_RDONLY | O_DIRECTORY) ;
@@ -32,4 +36,12 @@ int s6_svc_writectl (char const *service, char const *subdir, char const *s, siz
fd_close(fdsub) ;
return -2 ;
}
+
+#else
+
+ /* Too bad, get a better system */
+
+ return -2 ;
+
+#endif
}