From: Avi Kivity <a...@redhat.com>

Signed-off-by: Avi Kivity <a...@redhat.com>

diff --git a/lib/libcflat.h b/lib/libcflat.h
index d4ee2e0..0c62e4c 100644
--- a/lib/libcflat.h
+++ b/lib/libcflat.h
@@ -42,6 +42,7 @@ extern void panic(char *fmt, ...);
 
 extern unsigned long strlen(const char *buf);
 extern char *strcat(char *dest, const char *src);
+extern int strcmp(const char *a, const char *b);
 
 extern int printf(const char *fmt, ...);
 extern int vsnprintf(char *buf, int size, const char *fmt, va_list va);
diff --git a/lib/string.c b/lib/string.c
index 1f19f5c..9dc94a1 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -20,6 +20,17 @@ char *strcat(char *dest, const char *src)
     return dest;
 }
 
+int strcmp(const char *a, const char *b)
+{
+    while (*a == *b) {
+       if (*a == '\0') {
+           break;
+       }
+       ++a, ++b;
+    }
+    return *a - *b;
+}
+
 void *memset(void *s, int c, size_t n)
 {
     size_t i;
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to