This fixes a generic Windows/VC++ issue:

<http://thedailyreviewer.com/dotnet/view/strncasecmp-and-snprintf-functions-not-available-in-vc-109235975>

Does this change affect the automake/gcc-based Windows builds?

-- 
Samuli Seppänen
Community Manager
OpenVPN Technologies, Inc

irc freenode net: mattock

>From 96880655ebfc1859d18431eeecc9103d29951935 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Samuli=20Sepp=C3=A4nen?= <sam...@openvpn.net>
List-Post: openvpn-devel@lists.sourceforge.net
Date: Wed, 5 Jan 2011 15:14:21 +0200
Subject: [PATCH] Changed snprintf to _snprintf in service-win32/openvpnserv.c

This solves a fatal build error (LNK2019: unresolved external symbol _snprintf
referenced...) when using the Python-based build system
---
 service-win32/openvpnserv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/service-win32/openvpnserv.c b/service-win32/openvpnserv.c
index 07374e2..42be609 100755
--- a/service-win32/openvpnserv.c
+++ b/service-win32/openvpnserv.c
@@ -86,7 +86,7 @@ static HANDLE exit_event = NULL;
 /* snprintf with guaranteed null termination */
 #define mysnprintf(out, ...) \
         { \
-           snprintf (out, sizeof(out), __VA_ARGS__); \
+           _snprintf (out, sizeof(out), __VA_ARGS__); \
            out [sizeof (out) - 1] = '\0'; \
         }

-- 
1.6.3.3

Reply via email to