Blame SOURCES/2000-strace-provide-O_TMPFILE-fallback-definition.patch

9142b8
Some buildroots provide version of kernel-headers package that do not yet
9142b8
contains O_TMPFILE definition.  Since (looks like) there were none discrepancies
9142b8
in O_TMPFILE definition in RHEL, work that around by providing a fallback
9142b8
definition of O_TMPFILE.
9142b8
Index: strace-5.2/src/open.c
9142b8
===================================================================
9142b8
--- strace-5.2.orig/src/open.c	2019-07-11 19:51:22.000000000 +0200
9142b8
+++ strace-5.2/src/open.c	2019-07-22 17:49:41.508766666 +0200
9142b8
@@ -32,6 +32,10 @@
9142b8
 #include <linux/openat2.h>
9142b8
 #include <linux/fcntl.h>
9142b8
 
9142b8
+#ifndef O_TMPFILE
9142b8
+# define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
9142b8
+#endif
9142b8
+
9142b8
 #include "xlat/open_access_modes.h"
9142b8
 #include "xlat/open_mode_flags.h"
9142b8
 #include "xlat/open_resolve_flags.h"