about summary refs log tree commit diff
path: root/io/openat64.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/openat64.c')
-rw-r--r--io/openat64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io/openat64.c b/io/openat64.c
index 7801a92e76..060fdf9045 100644
--- a/io/openat64.c
+++ b/io/openat64.c
@@ -24,7 +24,7 @@
 #include <libc-internal.h>
 
 /* 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
 __openat64 (int fd, const char *file, int oflag, ...)
@@ -51,7 +51,7 @@ __openat64 (int fd, const char *file, int oflag, ...)
 	}
     }
 
-  if (oflag & O_CREAT)
+  if (__OPEN_NEEDS_MODE (oflag))
     {
       va_list arg;
       va_start (arg, oflag);