Index: uspace/lib/c/include/adt/hash.h
===================================================================
--- uspace/lib/c/include/adt/hash.h	(revision 6efec7e3724016bbb7204cba04cd589bc4cdc07d)
+++ uspace/lib/c/include/adt/hash.h	(revision 59ba70812ef257904eee5e469930b9239f720fc6)
@@ -111,3 +111,23 @@
 }
 
+/** Calculate hash of NULL-terminated string
+ *
+ * TODO Modify also same file in kernel subtree?
+ *
+ * @param[in]  str     NULL-terminated string (not NULL)
+ */
+static inline size_t hash_string(const char *str)
+{
+	/*
+	 * Using djb2 function
+	 * http://www.cse.yorku.ca/~oz/hash.html
+	 */
+	size_t hash = 5381;
+	char c;
+	while ((c = *str++)) {
+		hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
+	}
+	return hash;
+}
+
 #endif
