Some changes required to get yabel working on v2 (and they generally make
[coreboot.git] / src / include / string.h
index 25e741e810156f5f4f2198b2c57661ee88cf0f57..d82b3ac1c4abb6b418f09a1a95b3352c905738ac 100644 (file)
@@ -81,6 +81,18 @@ static inline int strcmp(const char *s1, const char *s2)
        return r;
 }  
 
+static inline int strncmp(const char *s1, const char *s2, int maxlen)
+{
+       int i;
+
+       for (i = 0; i < maxlen; i++) {
+               if (s1[i] != s2[i])
+                       return s1[i] - s2[i];
+       }
+
+       return 0;
+}
+
 static inline int isspace(int c)
 {
        switch (c) {