about summary refs log tree commit diff
path: root/io/openat.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/openat.c')
-rw-r--r--io/openat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io/openat.c b/io/openat.c
index e54eb9bcad..08d61843fa 100644
--- a/io/openat.c
+++ b/io/openat.c
@@ -31,7 +31,7 @@ int __have_atfcts;
 #endif
 
 /* Open FILE with access OFLAG.  Interpret relative paths relative to
-   the directory associated with FD.  If OFLAG includes O_CREAT, a
+   the directory associated with FD.  If O_CREAT or O_TMPFILE is in OFLAG, a
    third argument is the file protection.  */
 int
 __openat (int fd, const char *file, int oflag, ...)
@@ -58,7 +58,7 @@ __openat (int fd, const char *file, int oflag, ...)
 	}
     }
 
-  if (oflag & O_CREAT)
+  if (__OPEN_NEEDS_MODE (oflag))
     {
       va_list arg;
       va_start (arg, oflag);