From 9d836ea7a69a6441fcdca815328d274e4ed6b707 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 30 Oct 2014 20:03:56 -0400 Subject: [PATCH] fix failure of open to read variadic mode argument for O_TMPFILE --- src/fcntl/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fcntl/open.c b/src/fcntl/open.c index 5e5be1d7..3928a6e6 100644 --- a/src/fcntl/open.c +++ b/src/fcntl/open.c @@ -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); -- 2.25.1