Skip to contentSkip to conversation

perf tools: Add CAP_SYSLOG define for older systems

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Aug 15, 2019 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  083c1359b0e03867a8c7effd21d4c0be3639f336
Gitweb:     https://git.kernel.org/tip/083c1359b0e03867a8c7effd21d4c0be3639f336
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Tue, 13 Aug 2019 11:38:19 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 14 Aug 2019 10:59:59 -0300

perf tools: Add CAP_SYSLOG define for older systems

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 <[email protected]>
Cc Alexey Budankov <[email protected]>
Cc Igor Lubashev <[email protected]>
Cc James Morris <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mathieu Poirier <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Suzuki Poulouse <[email protected]>
---
 tools/perf/util/cap.h | 5 +++++
 1 file changed, 5 insertions(+)
tools/perf/util/cap.h +5 -0
index 10af94e473da..051dc590ceee 100644
@@ -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 */