summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/hashmap.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-06-13 15:28:08 -0700
committerDavid S. Miller <davem@davemloft.net>2020-06-13 15:28:08 -0700
commitfa7566a0d68f8467846cba8ec29f1551b0a42de9 (patch)
treec520797b309d68cacd4bb9089473af7bf8644f07 /tools/lib/bpf/hashmap.h
parentbf97bac9dc6481e9f68992e52bed5cc4b210e636 (diff)
parent29fcb05bbf1a7008900bb9bee347bdbfc7171036 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Alexei Starovoitov says: ==================== pull-request: bpf 2020-06-12 The following pull-request contains BPF updates for your *net* tree. We've added 26 non-merge commits during the last 10 day(s) which contain a total of 27 files changed, 348 insertions(+), 93 deletions(-). The main changes are: 1) sock_hash accounting fix, from Andrey. 2) libbpf fix and probe_mem sanitizing, from Andrii. 3) sock_hash fixes, from Jakub. 4) devmap_val fix, from Jesper. 5) load_bytes_relative fix, from YiFei. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/lib/bpf/hashmap.h')
-rw-r--r--tools/lib/bpf/hashmap.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/lib/bpf/hashmap.h b/tools/lib/bpf/hashmap.h
index e823b35e7371..df59fd4fc95b 100644
--- a/tools/lib/bpf/hashmap.h
+++ b/tools/lib/bpf/hashmap.h
@@ -10,10 +10,9 @@
#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
static inline size_t hash_bits(size_t h, int bits)