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 2215bb8df..eb1633be2 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -456,6 +456,14 @@ off_t fdlength(int fd)
456 return pos + 1; 456 return pos + 1;
457} 457}
458 458
459int bb_putchar(int ch)
460{
461 /* time.c needs putc(ch, stdout), not putchar(ch).
462 * it does "stdout = stderr;", but then glibc's putchar()
463 * doesn't work as expected. bad glibc, bad */
464 return putc(ch, stdout);
465}
466
459// Die with an error message if we can't malloc() enough space and do an 467// Die with an error message if we can't malloc() enough space and do an
460// sprintf() into that space. 468// sprintf() into that space.
461char *xasprintf(const char *format, ...) 469char *xasprintf(const char *format, ...)