From 98dc2db5f11e6d597ca44aa6bf49f0dbd4397725 Mon Sep 17 00:00:00 2001 From: Bruce Cran Date: Wed, 3 Oct 2012 19:46:46 +0200 Subject: [PATCH] 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 --- os/windows/posix.c | 4 ++-- 1 file 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) -- 2.25.1