diff options
author | Bruce Cran <bruce@cran.org.uk> | 2012-10-03 19:46:46 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-10-03 19:46:46 +0200 |
commit | 98dc2db5f11e6d597ca44aa6bf49f0dbd4397725 (patch) | |
tree | 27c162562852cba8a0d95491d966f1fc12815bb9 /os/windows/posix.c | |
parent | 27357187b0899380bae5c6748f2b2d034502e162 (diff) | |
download | fio-98dc2db5f11e6d597ca44aa6bf49f0dbd4397725.tar.gz fio-98dc2db5f11e6d597ca44aa6bf49f0dbd4397725.tar.bz2 |
XP/2003 compatability fix
The attached patch fixes the bug that on XP fio fails with:
"The procedure entry point vsprintf_s could not be located in the
dynamic link library msvcrt.dll".
Only Vista and newer have the 'secure' functions, so we need to use
vsprintf to maintain compatibility with XP.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'os/windows/posix.c')
-rwxr-xr-x | os/windows/posix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/os/windows/posix.c b/os/windows/posix.c index ce41ef8e..6ad47df8 100755 --- a/os/windows/posix.c +++ b/os/windows/posix.c @@ -234,10 +234,10 @@ void syslog(int priority, const char *message, ... /* argument */) va_start(v, message); len = _vscprintf(message, v); output = malloc(len + sizeof(char)); - vsprintf_s(output, len + sizeof(char), message, v); + vsprintf(output, message, v); WriteFile(log_file, output, len, &bytes_written, NULL); va_end(v); - free(output); + free(output); } int kill(pid_t pid, int sig) |