提交 9d836ea7 编写于 作者: R Rich Felker

fix failure of open to read variadic mode argument for O_TMPFILE

上级 dc95322e
...@@ -7,7 +7,7 @@ int open(const char *filename, int flags, ...) ...@@ -7,7 +7,7 @@ int open(const char *filename, int flags, ...)
{ {
mode_t mode = 0; mode_t mode = 0;
if (flags & O_CREAT) { if ((flags & O_CREAT) || (flags & O_TMPFILE) == O_TMPFILE) {
va_list ap; va_list ap;
va_start(ap, flags); va_start(ap, flags);
mode = va_arg(ap, mode_t); mode = va_arg(ap, mode_t);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册