fix failure of open to read variadic mode argument for O_TMPFILE

This commit is contained in:
Rich Felker 2014-10-30 20:03:56 -04:00
parent dc95322e18
commit 9d836ea7a6
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ int open(const char *filename, int flags, ...)
{
mode_t mode = 0;
if (flags & O_CREAT) {
if ((flags & O_CREAT) || (flags & O_TMPFILE) == O_TMPFILE) {
va_list ap;
va_start(ap, flags);
mode = va_arg(ap, mode_t);