rewrite the device subsystem interfaces (#48)
[lunaix-os.git] / lunaix-os / libs / hash.c
index dc1b3ccb1c1af2f9e537457a6fc8b01637b472c5..3a0555fee81e38d2e58af2ad7a3ba0c800ff0d5e 100644 (file)
@@ -1,4 +1,5 @@
-#include <lib/hash.h>
+#include <klibc/hash.h>
+#include <lunaix/compiler.h>
 
 /**
  * @brief Simple string hash function
 
 /**
  * @brief Simple string hash function
@@ -8,13 +9,13 @@
  * @param str
  * @return unsigned int
  */
  * @param str
  * @return unsigned int
  */
-uint32_t
-strhash_32(const char* str, uint32_t truncate_to)
+u32_t _weak
+strhash_32(const char* str, u32_t truncate_to)
 {
     if (!str)
         return 0;
 
 {
     if (!str)
         return 0;
 
-    uint32_t hash = 5381;
+    u32_t hash = 5381;
     int c;
 
     while ((c = *str++))
     int c;
 
     while ((c = *str++))