summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/hashmap.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-06-17 12:39:12 +0100
committerMark Brown <broonie@kernel.org>2020-06-17 12:39:12 +0100
commit6870112c46c867f50cd27570860a05bd82614b5c (patch)
treebd9f13f6ab25072809564460a34bf0fb40900069 /tools/lib/bpf/hashmap.h
parent6f1cf5257acc6e6242ddf2f52bc7912aed77b79f (diff)
parentb3a9e3b9622ae10064826dccb4f7a52bd88c7407 (diff)
Merge tag 'v5.8-rc1' into regulator-5.8
Linux 5.8-rc1
Diffstat (limited to 'tools/lib/bpf/hashmap.h')
-rw-r--r--tools/lib/bpf/hashmap.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/lib/bpf/hashmap.h b/tools/lib/bpf/hashmap.h
index bae8879cdf58..df59fd4fc95b 100644
--- a/tools/lib/bpf/hashmap.h
+++ b/tools/lib/bpf/hashmap.h
@@ -10,12 +10,10 @@
#include <stdbool.h>
#include <stddef.h>
-#ifdef __GLIBC__
-#include <bits/wordsize.h>
-#else
-#include <bits/reg.h>
+#include <limits.h>
+#ifndef __WORDSIZE
+#define __WORDSIZE (__SIZEOF_LONG__ * 8)
#endif
-#include "libbpf_internal.h"
static inline size_t hash_bits(size_t h, int bits)
{