From: Florian Forster Date: Fri, 10 Oct 2008 10:40:38 +0000 (+0200) Subject: src/utils_tail.c: Call `clearerr' before `fgets'. X-Git-Tag: collectd-4.4.4~4 X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=b978177200519893f6ff9c5e459a3d9d6a72b887 src/utils_tail.c: Call `clearerr' before `fgets'. Hopefully this will resolve problems under the dietlibc. --- 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;