[PATCH 16/66] perf trace: Add conditional define for AT_FDCWD
From: Arnaldo Carvalho de Melo
Date: Tue Jul 12 2016 - 18:55:40 EST
From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
This one was only defined if _GNU_SOURCE was set in older glibc
versions, check that and provide the define in such cases.
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-ilsgsysr6s3mru7rf2befnu5@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/builtin-trace.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index e7e0b6e306b7..570a78c706c2 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -334,6 +334,10 @@ static size_t syscall_arg__scnprintf_fd(char *bf, size_t size,
#define SCA_FD syscall_arg__scnprintf_fd
+#ifndef AT_FDCWD
+#define AT_FDCWD -100
+#endif
+
static size_t syscall_arg__scnprintf_fd_at(char *bf, size_t size,
struct syscall_arg *arg)
{
--
2.7.4