From: David van Moolenbroek Date: Wed, 14 Apr 2010 11:07:49 +0000 (+0000) Subject: unbreak _open for gcc-compiled programs X-Git-Tag: v3.1.7~143 X-Git-Url: http://zhaoyanbai.com/repos/%22../static/icons/ChangeLog.html?a=commitdiff_plain;h=05f8a5c550fec943497a4b309c37a5e6d039fc9e;p=minix.git unbreak _open for gcc-compiled programs --- diff --git a/lib/libc/posix/_open.c b/lib/libc/posix/_open.c index 7b5790724..39ba74f06 100644 --- a/lib/libc/posix/_open.c +++ b/lib/libc/posix/_open.c @@ -17,7 +17,10 @@ PUBLIC int open(const char *name, int flags) if (flags & O_CREAT) { m.m1_i1 = strlen(name) + 1; m.m1_i2 = flags; - m.m1_i3 = va_arg(argp, mode_t); + /* Since it's a vararg parameter that is smaller than + * an int, the mode was passed as an int. + */ + m.m1_i3 = va_arg(argp, int); m.m1_p1 = (char *) name; } else { _loadname(name, &m);