about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/fcntl/open.c2
1 files changed, 1 insertions, 1 deletions
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);