summaryrefslogtreecommitdiff
path: root/tools/perf/util/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r--tools/perf/util/util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index c2330918110..e7cefc8f7d1 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -256,11 +256,13 @@ void event_attr_init(struct perf_event_attr *attr);
* *not* considered a power of two.
*/
+#ifndef _LINUX_LOG2_H /* is_power_of_2 is defined here too, and Bionic drags in that header */
static inline __attribute__((const))
bool is_power_of_2(unsigned long n)
{
return (n != 0 && ((n & (n - 1)) == 0));
}
+#endif
size_t hex_width(u64 v);
int hex2u64(const char *ptr, u64 *val);