Commit 6a9239990ac1146928d4523b8d164f8995d46ce2

Scott J. Goldman 2012-06-21T11:15:30

Merge pull request #781 from liyuray/development fix crash issue on mingw caused by variable argument list type promotion.

1
2
3
4
5
6
7
8
9
10
11
12
13
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);
 	}