summaryrefslogtreecommitdiff
path: root/sysdeps/posix/tempname.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/tempname.c')
-rw-r--r--sysdeps/posix/tempname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/posix/tempname.c b/sysdeps/posix/tempname.c
index eab658da31..be979d8c8a 100644
--- a/sysdeps/posix/tempname.c
+++ b/sysdeps/posix/tempname.c
@@ -297,7 +297,7 @@ __gen_tempname (char *tmpl, int flags, int kind)
{
case __GT_FILE:
fd = __open (tmpl,
- (flags & ~ACCESSPERMS)
+ (flags & ~O_ACCMODE)
| O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
break;