summaryrefslogtreecommitdiff
path: root/src/clock/s6-clockadd.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2022-07-18 12:59:51 +0000
committerLaurent Bercot <ska@appnovation.com>2022-07-18 12:59:51 +0000
commite04c90b246fe5fc32b237729c0be51459286860f (patch)
tree7ae414de241770a83c6c90aa085739bdaa9512a4 /src/clock/s6-clockadd.c
parent68db8af7c26461d4477f482ecbc279729fa911e4 (diff)
downloads6-networking-e04c90b246fe5fc32b237729c0be51459286860f.tar.xz
Fix allread errno management
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/clock/s6-clockadd.c')
-rw-r--r--src/clock/s6-clockadd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/clock/s6-clockadd.c b/src/clock/s6-clockadd.c
index 010222f..b8a976f 100644
--- a/src/clock/s6-clockadd.c
+++ b/src/clock/s6-clockadd.c
@@ -1,5 +1,7 @@
/* ISC license. */
+#include <errno.h>
+
#include <skalibs/sgetopt.h>
#include <skalibs/types.h>
#include <skalibs/allreadwrite.h>
@@ -32,6 +34,7 @@ int main (int argc, char const *const *argv)
}
{
char buf[TAIN_PACK] ;
+ errno = EPIPE ;
if (allread(0, buf, TAIN_PACK) < TAIN_PACK)
strerr_diefu1sys(111, "read 16 bytes from stdin") ;
tain_unpack(buf, &adj) ;