aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2016-07-05 14:43:27 -0300
committerArnaldo Carvalho de Melo <[email protected]>2016-07-12 15:19:53 -0300
commit48e1f91ad2cadcb5689a2a3b6ed141d45009b45e (patch)
tree90f1cf4f01d30b3152727e68a9a88a6d074e4402
parent1fbe7df819d9958f139b87014a2f0d5b34da76d5 (diff)
perf trace: Add conditional define for AT_FDCWD
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 <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/builtin-trace.c4
1 files changed, 4 insertions, 0 deletions
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)
{