summaryrefslogtreecommitdiff
path: root/libbb/xfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r--libbb/xfuncs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 2215bb8..eb1633b 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -456,6 +456,14 @@ off_t fdlength(int fd)
return pos + 1;
}
+int bb_putchar(int ch)
+{
+ /* time.c needs putc(ch, stdout), not putchar(ch).
+ * it does "stdout = stderr;", but then glibc's putchar()
+ * doesn't work as expected. bad glibc, bad */
+ return putc(ch, stdout);
+}
+
// Die with an error message if we can't malloc() enough space and do an
// sprintf() into that space.
char *xasprintf(const char *format, ...)