Merge pull request #781 from liyuray/development fix crash issue on mingw caused by variable argument list type promotion.
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c
index 37956af..4e0150f 100644
--- a/src/win32/posix_w32.c
+++ b/src/win32/posix_w32.c
@@ -232,7 +232,7 @@ int p_open(const char *path, int flags, ...)
va_list arg_list;
va_start(arg_list, flags);
- mode = va_arg(arg_list, mode_t);
+ mode = (mode_t)va_arg(arg_list, int);
va_end(arg_list);
}