[PATCH 15/28] perf tools: Add CAP_SYSLOG define for older systems

From: Arnaldo Carvalho de Melo
Date: Wed Aug 14 2019 - 14:44:28 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

Some of the systems I test don't have that define, provide it
conditionally since we'll use it in the kptr_restrict checks in the next
patch.

Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Alexey Budankov <alexey.budankov@xxxxxxxxxxxxxxx>
Cc: Igor Lubashev <ilubashe@xxxxxxxxxx>
Cc: James Morris <jmorris@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Suzuki Poulouse <suzuki.poulose@xxxxxxx>
Link: https://lkml.kernel.org/n/tip-dcize2v6jjab7tds5ngz97dk@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/cap.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/tools/perf/util/cap.h b/tools/perf/util/cap.h
index 10af94e473da..051dc590ceee 100644
--- a/tools/perf/util/cap.h
+++ b/tools/perf/util/cap.h
@@ -24,4 +24,9 @@ static inline bool perf_cap__capable(int cap __maybe_unused)

#endif /* HAVE_LIBCAP_SUPPORT */

+/* For older systems */
+#ifndef CAP_SYSLOG
+#define CAP_SYSLOG 34
+#endif
+
#endif /* __PERF_CAP_H */
--
2.21.0