summary refs log tree commit diff
path: root/sysdeps/posix/open64.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/open64.c')
-rw-r--r--sysdeps/posix/open64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/posix/open64.c b/sysdeps/posix/open64.c
index 8f8dc60e24..74f669f408 100644
--- a/sysdeps/posix/open64.c
+++ b/sysdeps/posix/open64.c
@@ -19,14 +19,14 @@
 #include <stdarg.h>
 #include <sysdep-cancel.h>
 
-/* Open FILE with access OFLAG.  If OFLAG includes O_CREAT,
+/* Open FILE with access OFLAG.  If O_CREAT or O_TMPFILE is in OFLAG,
    a third argument is the file protection.  */
 int
 __libc_open64 (const char *file, int oflag, ...)
 {
   int mode = 0;
 
-  if (oflag & O_CREAT)
+  if (__OPEN_NEEDS_MODE (oflag))
     {
       va_list arg;
       va_start (arg, oflag);