sync with OpenBSD -current
This commit is contained in:
parent
6bd4a87a12
commit
6fc9e02a30
25 changed files with 193 additions and 130 deletions
|
@ -271,8 +271,8 @@ log_vmsg(int pri, const char* type,
|
|||
}
|
||||
now = (time_t)time(NULL);
|
||||
#if defined(HAVE_STRFTIME) && defined(HAVE_LOCALTIME_R)
|
||||
if(log_time_asc && strftime(tmbuf, sizeof(tmbuf), "%b %d %H:%M:%S",
|
||||
localtime_r(&now, &tm))%(sizeof(tmbuf)) != 0) {
|
||||
if(log_time_asc && localtime_r(&now, &tm) && strftime(tmbuf,
|
||||
sizeof(tmbuf), "%b %d %H:%M:%S", &tm)%(sizeof(tmbuf)) != 0) {
|
||||
/* %sizeof buf!=0 because old strftime returned max on error */
|
||||
fprintf(logfile, "%s %s[%d:%x] %s: %s\n", tmbuf,
|
||||
ident, (int)getpid(), tid?*tid:0, type, message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue