From: Heiko Hund Date: Thu, 16 Feb 2012 17:30:39 +0000 (+0100) Subject: do not use mode_t on Windows X-Git-Tag: v2.3-alpha1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0109cbf459409a84963668c78f444c97ec2b349;p=thirdparty%2Fopenvpn.git do not use mode_t on Windows The MSVC headers do not define mode_t. open() uses an int for the permissions instead. Fixes building with the MSVC based buildsystem. Signed-off-by: Heiko Hund Acked-by: Gert Doering Signed-off-by: David Sommerseth --- diff --git a/misc.h b/misc.h index 8c0bae169..e7a0b55e9 100644 --- a/misc.h +++ b/misc.h @@ -158,7 +158,7 @@ openvpn_fopen (const char *path, const char *mode) #endif #ifdef WIN32 -int openvpn_open (const char *path, int flags, mode_t mode); +int openvpn_open (const char *path, int flags, int mode); #else static inline int openvpn_open (const char *path, int flags, mode_t mode) diff --git a/win32.c b/win32.c index 5b3891867..a8f4ed9a6 100644 --- a/win32.c +++ b/win32.c @@ -1064,7 +1064,7 @@ openvpn_fopen (const char *path, const char *mode) } int -openvpn_open (const char *path, int flags, mode_t mode) +openvpn_open (const char *path, int flags, int mode) { struct gc_arena gc = gc_new (); int fd = _wopen (wide_string (path, &gc), flags, mode);