aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/openat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/openat.c')
-rw-r--r--sysdeps/unix/sysv/linux/openat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
index 5145823b8e..30d8e6e1ac 100644
--- a/sysdeps/unix/sysv/linux/openat.c
+++ b/sysdeps/unix/sysv/linux/openat.c
@@ -54,13 +54,13 @@ OPENAT_NOT_CANCEL (int fd, const char *file, int oflag, mode_t mode)
/* Open FILE with access OFLAG. Interpret relative paths relative to
- the directory associated with FD. If OFLAG includes O_CREAT, a
- third argument is the file protection. */
+ the directory associated with FD. If OFLAG includes O_CREAT or
+ O_TMPFILE, a fourth argument is the file protection. */
int
__OPENAT (int fd, const char *file, int oflag, ...)
{
mode_t mode = 0;
- if (oflag & O_CREAT)
+ if (__OPEN_NEEDS_MODE (oflag))
{
va_list arg;
va_start (arg, oflag);