I stopped following all OpenVPN changes. It seems like more changes are entered than should without proper review.
Anyway, this is not the correct solution. Correct solution is to have config-msvc.h and have: --- #define mode_t int --- And in autoconf (if mingw does not have this as well): AC_CHECK_DECLS( [mode_t], , [AC_DEFINE([mode_t],[int], [Emulate mode_t])], [[ #include <fcntl.h> ]] ) On Thu, Feb 16, 2012 at 7:30 PM, Heiko Hund <heiko.h...@sophos.com> wrote: > > 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 <heiko.h...@sophos.com> > --- > misc.h | 2 +- > win32.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/misc.h b/misc.h > index 8c0bae1..e7a0b55 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 5b38918..a8f4ed9 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); > -- > 1.7.5.4 > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel