[PATCH] [BZ #17912] powerpc: Add O_TMPFILE to <fcntl.h>

Rajalakshmi Srinivasaraghavan raji@linux.vnet.ibm.com
Mon Feb 2 05:23:00 GMT 2015


O_TMPFILE takes incorrect value of 020200000 for powerpc as the
definition is missing.This causes open() to  fail
when passing O_TMPFILE.Since __O_DIRECTORY value is different for
powerpc O_TMPFILE has to be changed.

	[BZ #17912]
	* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Add O_TMPFILE.
---
 NEWS                                         | 2 +-
 sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 8e2729b..2a42199 100644
--- a/NEWS
+++ b/NEWS
@@ -18,7 +18,7 @@ Version 2.21
   17657, 17658, 17664, 17665, 17668, 17682, 17702, 17717, 17719, 17722,
   17723, 17724, 17725, 17732, 17733, 17744, 17745, 17746, 17747, 17748,
   17775, 17777, 17780, 17781, 17782, 17791, 17793, 17796, 17797, 17803,
-  17806, 17834, 17844, 17848, 17868, 17869, 17870, 17885, 17892.
+  17806, 17834, 17844, 17848, 17868, 17869, 17870, 17885, 17892, 17912.
 
 * A new semaphore algorithm has been implemented in generic C code for all
   machines. Previous custom assembly implementations of semaphore were
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
index b276320..d7c744c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
@@ -25,6 +25,7 @@
 #define __O_DIRECTORY	 040000	/* Must be a directory.	 */
 #define __O_NOFOLLOW	0100000	/* Do not follow links.	 */
 #define __O_DIRECT	0400000	/* Direct disk access.	*/
+#define __O_TMPFILE    020040000 /* Atomically create nameless file.  */
 
 #if __WORDSIZE == 64
 /* Not necessary, files are always with 64bit off_t.  */
-- 
1.9.1



More information about the Libc-alpha mailing list