summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs6dns/s6dns_engine.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c
index 10f588c..8c99194 100644
--- a/src/libs6dns/s6dns_engine.c
+++ b/src/libs6dns/s6dns_engine.c
@@ -84,7 +84,9 @@ static int s6dns_mininetstring_read (int fd, stralloc *sa, uint32_t *w)
*w &= ~(1U << 30) ;
}
{
- size_t r = allread(fd, sa->s + sa->len, *w) ;
+ size_t r ;
+ errno = EPIPE ;
+ r = allread(fd, sa->s + sa->len, *w) ;
sa->len += r ; *w -= r ;
}
return *w ? -1 : 1 ;