lkml.org 
[lkml]   [2020]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[RFC PATCH v2 13/23] lib/bpf hashmap: increase portability
From
Don't include libbpf_internal.h as it is unused and has conflicting
definitions, for example, with tools/perf/util/debug.h.
Fix a non-glibc include path.

Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/lib/bpf/hashmap.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/lib/bpf/hashmap.h b/tools/lib/bpf/hashmap.h
index bae8879cdf58..d5ef212a55ba 100644
--- a/tools/lib/bpf/hashmap.h
+++ b/tools/lib/bpf/hashmap.h
@@ -13,9 +13,8 @@
#ifdef __GLIBC__
#include <bits/wordsize.h>
#else
-#include <bits/reg.h>
+#include <linux/bitops.h>
#endif
-#include "libbpf_internal.h"

static inline size_t hash_bits(size_t h, int bits)
{
--
2.26.2.526.g744177e7f7-goog
\
 
 \ /
  Last update: 2020-05-07 16:10    [W:0.286 / U:2.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site