This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [BZ #17912] powerpc: Add O_TMPFILE to <fcntl.h>
- From: Andreas Schwab <schwab at suse dot de>
- To: Rajalakshmi Srinivasaraghavan <raji at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 02 Feb 2015 11:13:05 +0100
- Subject: Re: [PATCH] [BZ #17912] powerpc: Add O_TMPFILE to <fcntl.h>
- Authentication-results: sourceware.org; auth=none
- References: <1422854477-98275-1-git-send-email-raji at linux dot vnet dot ibm dot com>
This is broken on any architecture with a non-default O_DIRECTORY, so
let's fix it for real.
Andreas.
[BZ #17912]
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h (__O_TMPFILE): Define
in terms of __O_DIRECTORY.
---
sysdeps/unix/sysv/linux/bits/fcntl-linux.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
index 3d28c84..d2baeb3 100644
--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
+++ b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h
@@ -97,7 +97,7 @@
# define __O_DSYNC 010000
#endif
#ifndef __O_TMPFILE
-# define __O_TMPFILE 020200000
+# define __O_TMPFILE (020000000 | __O_DIRECTORY)
#endif
#ifndef F_GETLK
--
2.2.2
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."