Introducing LunaBuild to the build flow (#36)
[lunaix-os.git] / lunaix-os / kernel / ds / btrie.c
index 5ce7687da18247862821ce0166b7d9521e3f5215..781def41d1d979e1ddd61c81d7fa2d4eec9cb53a 100644 (file)
@@ -19,7 +19,7 @@ struct btrie_node*
 __btrie_traversal(struct btrie* root, u32_t index, int options)
 {
     index = index >> root->truncated;
-    u32_t lz = index ? ROUNDDOWN(31 - __builtin_clz(index), BTRIE_BITS) : 0;
+    u32_t lz = index ? ROUNDDOWN(31 - clz(index), BTRIE_BITS) : 0;
     u32_t bitmask = ((1 << BTRIE_BITS) - 1) << lz;
     u32_t i = 0;
     struct btrie_node* tree = root->btrie_root;