From a13cd253ca1ce987e4feca7d80bd19ff749f7787 Mon Sep 17 00:00:00 2001 From: Heiko Hund Date: Thu, 16 Feb 2012 18:30:40 +0100 Subject: use the underscore version of stat on Windows MSVC does not know wstat(). Instead _wstat() must be used here. Unfortunately _wstat() takes a 'struct _stat'. A type 'stat_t' is introduced to handle this situation in a portable way. [v2: Use openvpn_stat_t instead of stat_t (David Sommerseth)] Signed-off-by: Heiko Hund Signed-off-by: David Sommerseth Acked-by: Gert Doering --- win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'win32.c') diff --git a/win32.c b/win32.c index a8f4ed9..2ba97fc 100644 --- a/win32.c +++ b/win32.c @@ -1073,10 +1073,10 @@ openvpn_open (const char *path, int flags, int mode) } int -openvpn_stat (const char *path, struct stat *buf) +openvpn_stat (const char *path, openvpn_stat_t *buf) { struct gc_arena gc = gc_new (); - int res = wstat (wide_string (path, &gc), buf); + int res = _wstat (wide_string (path, &gc), buf); gc_free (&gc); return res; } -- cgit