summaryrefslogtreecommitdiff
path: root/lib/bitops.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-04-28 18:01:40 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-04-28 18:01:40 +0200
commit937e75d8f1d203b637ba0ea050026f9af92485f3 (patch)
tree2737eba68e77ac4030d24e42506db0947196f775 /lib/bitops.h
parenta7baa09862e6b4856cd66197c6bd74c7df336b8f (diff)
Add the Babel routing protocol (RFC 6126)
This patch implements the IPv6 subset of the Babel routing protocol. Based on the patch from Toke Hoiland-Jorgensen, with some heavy modifications and bugfixes. Thanks to Toke Hoiland-Jorgensen for the original patch.
Diffstat (limited to 'lib/bitops.h')
-rw-r--r--lib/bitops.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bitops.h b/lib/bitops.h
index c0ad1a70..ce13732a 100644
--- a/lib/bitops.h
+++ b/lib/bitops.h
@@ -25,5 +25,6 @@ u32 u32_log2(u32 v);
static inline u32 u32_hash(u32 v) { return v * 2902958171u; }
-#endif
+static inline u8 u32_popcount(u32 v) { return __builtin_popcount(v); }
+#endif