[tip:perf/core] perf trace beauty open_flags: Add more conditional defines

From: tip-bot for Arnaldo Carvalho de Melo
Date: Wed Jul 13 2016 - 03:05:54 EST


Commit-ID: ffe3a28a8b90879c21acf7a1a8f5277785b05ff6
Gitweb: http://git.kernel.org/tip/ffe3a28a8b90879c21acf7a1a8f5277785b05ff6
Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
AuthorDate: Tue, 5 Jul 2016 14:43:27 -0300
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 12 Jul 2016 00:00:39 -0300

perf trace beauty open_flags: Add more conditional defines

Don't handle some flags only if they have its defines in headers at
time of building, define what is missing.

Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Wang Nan <wangnan0@xxxxxxxxxx>
Link: http://lkml.kernel.org/n/tip-wgjxeidwpowrvqgrxr080k6u@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/trace/beauty/open_flags.c | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/tools/perf/trace/beauty/open_flags.c b/tools/perf/trace/beauty/open_flags.c
index 9c3a4cb..f55a459 100644
--- a/tools/perf/trace/beauty/open_flags.c
+++ b/tools/perf/trace/beauty/open_flags.c
@@ -2,6 +2,18 @@
#include <sys/stat.h>
#include <fcntl.h>

+#ifndef O_DIRECT
+#define O_DIRECT 00040000
+#endif
+
+#ifndef O_DIRECTORY
+#define O_DIRECTORY 00200000
+#endif
+
+#ifndef O_NOATIME
+#define O_NOATIME 01000000
+#endif
+
static size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size,
struct syscall_arg *arg)
{