[klibc] [PATCH 2/2] dummy ferror

Jon Ringle jon at ringle.org
Thu Jan 7 06:03:50 PST 2010


several autoconf tests use ferror()
Stream errors are not being tracked by klibc implementation,
so provide a dummy ferror() that just returns 0.

Signed-off-by: Jon Ringle <jon at ringle.org>
---
 usr/include/stdio.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/usr/include/stdio.h b/usr/include/stdio.h
index 1993f75..7d2c86d 100644
--- a/usr/include/stdio.h
+++ b/usr/include/stdio.h
@@ -115,6 +115,13 @@ static __inline__ int fflush(FILE * __f)
 	return 0;
 }
 
+/* stream errors are not kept track of by klibc implementation */
+static __inline__ int ferror(FILE * __f)
+{
+	(void)__f;
+	return 0;
+}
+
 __extern int sscanf(const char *, const char *, ...);
 __extern int vsscanf(const char *, const char *, va_list);
 
-- 
1.6.5.rc2



More information about the klibc mailing list