]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - tools/perf/util/cap.h
1 /* SPDX-License-Identifier: GPL-2.0 */
6 #include <linux/capability.h>
7 #include <linux/compiler.h>
9 #ifdef HAVE_LIBCAP_SUPPORT
11 #include <sys/capability.h>
13 bool perf_cap__capable(cap_value_t cap
);
18 #include <sys/types.h>
20 static inline bool perf_cap__capable(int cap __maybe_unused
)
22 return geteuid() == 0;
25 #endif /* HAVE_LIBCAP_SUPPORT */
27 /* For older systems */
32 #endif /* __PERF_CAP_H */