diff options
| author | David Malone <dwmalone@FreeBSD.org> | 2002-01-25 21:49:34 +0000 |
|---|---|---|
| committer | David Malone <dwmalone@FreeBSD.org> | 2002-01-25 21:49:34 +0000 |
| commit | ab09ef008f1665df57ec655ef0dbb6303f2e74cb (patch) | |
| tree | 76fd6c6828f7cf1cc11b4b2d8fe5bf61b6d16638 /lib/libc | |
| parent | d2979f90e7c99d8d2eaad7ff63603f49f8bff807 (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/gen/syslog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c index d3326ed6439c..b6eab59cd271 100644 --- a/lib/libc/gen/syslog.c +++ b/lib/libc/gen/syslog.c @@ -143,7 +143,7 @@ vsyslog(pri, fmt, ap) register char ch, *p; time_t now; int fd, saved_errno; - char *stdp, tbuf[2048], fmt_cpy[1024]; + char *stdp, tbuf[2048], fmt_cpy[1024], timbuf[26]; FILE *fp, *fmt_fp; struct bufcookie tbuf_cookie; struct bufcookie fmt_cookie; @@ -176,7 +176,7 @@ vsyslog(pri, fmt, ap) /* Build the message. */ (void)time(&now); (void)fprintf(fp, "<%d>", pri); - (void)fprintf(fp, "%.15s ", ctime(&now) + 4); + (void)fprintf(fp, "%.15s ", ctime_r(&now, timbuf) + 4); if (LogStat & LOG_PERROR) { /* Transfer to string buffer */ (void)fflush(fp); |
