From b978177200519893f6ff9c5e459a3d9d6a72b887 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 10 Oct 2008 12:40:38 +0200 Subject: [PATCH] src/utils_tail.c: Call `clearerr' before `fgets'. Hopefully this will resolve problems under the dietlibc. --- src/utils_tail.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils_tail.c b/src/utils_tail.c index eaf8f738..904a5212 100644 --- a/src/utils_tail.c +++ b/src/utils_tail.c @@ -162,6 +162,7 @@ int cu_tail_readline (cu_tail_t *obj, char *buf, int buflen) /* Try to read from the filehandle. If that succeeds, everything appears to * be fine and we can return. */ + clearerr (obj->fh); if (fgets (buf, buflen, obj->fh) != NULL) { buf[buflen - 1] = 0; -- 2.11.0