qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test


From: Pranith Kumar
Subject: [Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test
Date: Thu, 1 Dec 2016 00:14:27 -0500

Include a missing header and rename the function names to avoid
definition mis-match.

Signed-off-by: Pranith Kumar <address@hidden>
---
 tests/tcg/hello-i386.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/tcg/hello-i386.c b/tests/tcg/hello-i386.c
index fa00380..4a46f80 100644
--- a/tests/tcg/hello-i386.c
+++ b/tests/tcg/hello-i386.c
@@ -1,6 +1,7 @@
 #include <asm/unistd.h>
+#include <stddef.h>
 
-static inline void exit(int status)
+static inline void _exit(int status)
 {
   int __res;
   __asm__ volatile ("movl %%ecx,%%ebx\n"\
@@ -8,7 +9,7 @@ static inline void exit(int status)
                    :  "=a" (__res) : "0" (__NR_exit),"c" ((long)(status)));
 }
 
-static inline int write(int fd, const char * buf, int len)
+static inline int _write(int fd, const char * buf, int len)
 {
   int status;
   __asm__ volatile ("pushl %%ebx\n"\
@@ -22,6 +23,6 @@ static inline int write(int fd, const char * buf, int len)
 
 void _start(void)
 {
-    write(1, "Hello World\n", 12);
-    exit(0);
+    _write(1, "Hello World\n", 12);
+    _exit(0);
 }
-- 
2.10.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]