summaryrefslogtreecommitdiff
path: root/os/windows/posix.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-09-20 21:57:25 -0600
committerJens Axboe <axboe@fb.com>2016-09-20 21:57:25 -0600
commit1f086b55e7480b0926177576f36813b8b9eb4a61 (patch)
tree37988076ae51571d7e42b77a0d07ace87455a7b5 /os/windows/posix.c
parent5de1ade5a8a8dd118bdfac835a6cfb4bcf013734 (diff)
downloadfio-1f086b55e7480b0926177576f36813b8b9eb4a61.tar.gz
fio-1f086b55e7480b0926177576f36813b8b9eb4a61.tar.bz2
os/windows/posix.c: ensure that ctime_r() adds a newline
The normal POSIX versions do that. And as fio proper strips the newline, we end up losing the last digit if the Windows version does not add the newline. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'os/windows/posix.c')
-rwxr-xr-xos/windows/posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/windows/posix.c b/os/windows/posix.c
index 5830e4c4..33881278 100755
--- a/os/windows/posix.c
+++ b/os/windows/posix.c
@@ -250,7 +250,7 @@ char* ctime_r(const time_t *t, char *buf)
Time_tToSystemTime(*t, &systime);
/* We don't know how long `buf` is, but assume it's rounded up from the minimum of 25 to 32 */
- StringCchPrintfA(buf, 31, "%s %s %d %02d:%02d:%02d %04d", dayOfWeek[systime.wDayOfWeek % 7], monthOfYear[(systime.wMonth - 1) % 12],
+ StringCchPrintfA(buf, 31, "%s %s %d %02d:%02d:%02d %04d\n", dayOfWeek[systime.wDayOfWeek % 7], monthOfYear[(systime.wMonth - 1) % 12],
systime.wDay, systime.wHour, systime.wMinute, systime.wSecond, systime.wYear);
return buf;
}