summaryrefslogtreecommitdiff
path: root/scripts/kconfig/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/util.c')
-rw-r--r--scripts/kconfig/util.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c
index 610d64c01479..d6172f2f64c9 100644
--- a/scripts/kconfig/util.c
+++ b/scripts/kconfig/util.c
@@ -9,6 +9,16 @@
#include <string.h>
#include "lkc.h"
+unsigned int strhash(const char *s)
+{
+ /* fnv32 hash */
+ unsigned int hash = 2166136261U;
+
+ for (; *s; s++)
+ hash = (hash ^ *s) * 0x01000193;
+ return hash;
+}
+
struct file {
struct file *next;
char name[];