summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-07-13 11:07:25 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-07-13 11:07:25 +0000
commite37572acace0cb66d741c378ead5d01684e53521 (patch)
tree03ca4e3a56a7b448a467d50d7f82416979dfc885 /src
parentc978e2fff5425c70bad7e6179a03ed1f5ee1ef04 (diff)
downloads6-rc-e37572acace0cb66d741c378ead5d01684e53521.tar.xz
- s6-rc-init depends on SOCKET_LIB
- fix my stupidity (one can hope)
Diffstat (limited to 'src')
-rw-r--r--src/s6-rc/deps-exe/s6-rc-init1
-rw-r--r--src/s6-rc/s6-rc-compile.c6
2 files changed, 3 insertions, 4 deletions
diff --git a/src/s6-rc/deps-exe/s6-rc-init b/src/s6-rc/deps-exe/s6-rc-init
index b76070e..b5622f9 100644
--- a/src/s6-rc/deps-exe/s6-rc-init
+++ b/src/s6-rc/deps-exe/s6-rc-init
@@ -2,3 +2,4 @@ ${LIBS6RC}
-ls6
-lskarnet
${TAINNOW_LIB}
+${SOCKET_LIB}
diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c
index 8a72ce6..dfee167 100644
--- a/src/s6-rc/s6-rc-compile.c
+++ b/src/s6-rc/s6-rc-compile.c
@@ -486,21 +486,19 @@ static inline void add_sources (before_t *be, char const *srcdir)
struct stat st ;
int fd ;
direntry *d ;
+ satmp.len = cur ;
errno = 0 ;
d = readdir(dir) ;
if (!d) break ;
if (d->d_name[0] == '.') continue ;
if (d->d_name[str_chr(d->d_name, '\n')])
strerr_dief3x(2, "subdirectory of ", srcdir, " contains a newline character") ;
- if (!stralloc_catb(&satmp, d->d_name, str_len(d->d_name + 1))
- || !stralloc_0(&satmp))
- dienomem() ;
+ if (!stralloc_catb(&satmp, d->d_name, str_len(d->d_name + 1)) dienomem() ;
if (lstat(satmp.s + start, &st) < 0)
strerr_diefu2sys(111, "lstat ", satmp.s + start) ;
if (!S_ISDIR(st.st_mode)) continue ;
fd = open_readb(satmp.s + start) ;
if (fd < 0) strerr_diefu2sys(111, "open ", satmp.s + start) ;
- satmp.len = cur ;
add_source(be, fd, srcdir, d->d_name) ;
close(fd) ;
}