From: Avi Kivity <[EMAIL PROTECTED]>

Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/user/config-x86-common.mak b/user/config-x86-common.mak
index b09f9bf..cac499f 100644
--- a/user/config-x86-common.mak
+++ b/user/config-x86-common.mak
@@ -35,7 +35,7 @@ $(TEST_DIR)/smp.flat: $(cstart.o) $(TEST_DIR)/smptest.o
 $(TEST_DIR)/emulator.flat: $(cstart.o) $(TEST_DIR)/vm.o $(TEST_DIR)/print.o
 
 $(TEST_DIR)/libcflat.a: $(TEST_DIR)/lib/exit.o $(TEST_DIR)/lib/printf.o \
-       $(TEST_DIR)/lib/smp.o
+       $(TEST_DIR)/lib/smp.o $(TEST_DIR)/lib/string.o
        ar rcs $@ $^
 
 arch_clean:
diff --git a/user/test/x86/lib/string.c b/user/test/x86/lib/string.c
new file mode 100644
index 0000000..83e99fe
--- /dev/null
+++ b/user/test/x86/lib/string.c
@@ -0,0 +1,21 @@
+#include "string.h"
+
+unsigned long strlen(const char *buf)
+{
+    unsigned long len = 0;
+
+    while (*buf++)
+       ++len;
+    return len;
+}
+
+char *strcat(char *dest, const char *src)
+{
+    char *p = dest;
+
+    while (*p)
+       ++p;
+    while ((*p++ = *src++) != 0)
+       ;
+    return dest;
+}
diff --git a/user/test/x86/lib/string.h b/user/test/x86/lib/string.h
new file mode 100644
index 0000000..338d40f
--- /dev/null
+++ b/user/test/x86/lib/string.h
@@ -0,0 +1,7 @@
+#ifndef FLAT_LIB_STRING_H
+#define FLAT_LIB_STRING_H
+
+unsigned long strlen(const char *buf);
+char *strcat(char *dest, const char *src);
+
+#endif

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to