about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-10-30 20:03:56 -0400
committerRich Felker <dalias@aerifal.cx>2014-10-30 20:03:56 -0400
commit9d836ea7a69a6441fcdca815328d274e4ed6b707 (patch)
tree9402f411a5a9784b35368da3837f684841b29372
parentdc95322e18615392eea69de355edd735a15a8f36 (diff)
downloadmusl-9d836ea7a69a6441fcdca815328d274e4ed6b707.tar.gz
musl-9d836ea7a69a6441fcdca815328d274e4ed6b707.tar.xz
musl-9d836ea7a69a6441fcdca815328d274e4ed6b707.zip
fix failure of open to read variadic mode argument for O_TMPFILE
-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);