aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/syslog.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/syslog.c b/misc/syslog.c
index ba994eeeb8..068a89e919 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -122,8 +122,14 @@ vsyslog(pri, fmt, ap)
f = open_memstream (&buf, &bufsize);
prioff = fprintf (f, "<%d>", pri);
(void) time (&now);
+#ifdef USE_IN_LIBIO
+ f->_IO_write_ptr += strftime (f->_IO_write_ptr,
+ f->_IO_write_end - f->_IO_write_ptr,
+ "%h %e %T ", localtime (&now));
+#else
f->__bufp += strftime (f->__bufp, f->__put_limit - f->__bufp,
"%h %e %T ", localtime (&now));
+#endif
msgoff = ftell (f);
if (LogTag == NULL)
LogTag = __progname;