diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-04-13 10:50:23 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-04-14 07:57:53 -0400 |
commit | 6fb35b9515c6300cb25022ac74f5f5617a349e18 (patch) | |
tree | 38ff92c8b16989c6f6cbb04ae433201f405ca5ec /tools/perf | |
parent | c5ab6ad7f627f031e2bbde575c7e6e27ea36da55 (diff) |
perf trace: Add seccomp beautifier related defines for older systems
Were the detached tarball (make perf-tar-src-pkg) build was failing because
those definitions aren't available in the system headers.
On RHEL7, for instance:
builtin-trace.c: In function ‘syscall_arg__scnprintf_seccomp_op’:
builtin-trace.c:1069:7: error: ‘SECCOMP_SET_MODE_STRICT’ undeclared (first use in this function)
P_SECCOMP_SET_MODE_OP(STRICT);
^
builtin-trace.c:1069:7: note: each undeclared identifier is reported only once for each function it appears in
builtin-trace.c:1070:7: error: ‘SECCOMP_SET_MODE_FILTER’ undeclared (first use in this function)
P_SECCOMP_SET_MODE_OP(FILTER);
^
builtin-trace.c: In function ‘syscall_arg__scnprintf_seccomp_flags’:
builtin-trace.c:1091:14: error: ‘SECCOMP_FILTER_FLAG_TSYNC’ undeclared (first use in this function)
P_FLAG(TSYNC);
^
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-4f8dzzwd7g6l5dzz693u7kul@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-trace.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index d49c131bb5de..246866c63e5e 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -1059,6 +1059,13 @@ static const char *tioctls[] = { | |||
1059 | static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); | 1059 | static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401); |
1060 | #endif /* defined(__i386__) || defined(__x86_64__) */ | 1060 | #endif /* defined(__i386__) || defined(__x86_64__) */ |
1061 | 1061 | ||
1062 | #ifndef SECCOMP_SET_MODE_STRICT | ||
1063 | #define SECCOMP_SET_MODE_STRICT 0 | ||
1064 | #endif | ||
1065 | #ifndef SECCOMP_SET_MODE_FILTER | ||
1066 | #define SECCOMP_SET_MODE_FILTER 1 | ||
1067 | #endif | ||
1068 | |||
1062 | static size_t syscall_arg__scnprintf_seccomp_op(char *bf, size_t size, struct syscall_arg *arg) | 1069 | static size_t syscall_arg__scnprintf_seccomp_op(char *bf, size_t size, struct syscall_arg *arg) |
1063 | { | 1070 | { |
1064 | int op = arg->val; | 1071 | int op = arg->val; |
@@ -1077,6 +1084,10 @@ static size_t syscall_arg__scnprintf_seccomp_op(char *bf, size_t size, struct sy | |||
1077 | 1084 | ||
1078 | #define SCA_SECCOMP_OP syscall_arg__scnprintf_seccomp_op | 1085 | #define SCA_SECCOMP_OP syscall_arg__scnprintf_seccomp_op |
1079 | 1086 | ||
1087 | #ifndef SECCOMP_FILTER_FLAG_TSYNC | ||
1088 | #define SECCOMP_FILTER_FLAG_TSYNC 1 | ||
1089 | #endif | ||
1090 | |||
1080 | static size_t syscall_arg__scnprintf_seccomp_flags(char *bf, size_t size, | 1091 | static size_t syscall_arg__scnprintf_seccomp_flags(char *bf, size_t size, |
1081 | struct syscall_arg *arg) | 1092 | struct syscall_arg *arg) |
1082 | { | 1093 | { |