Received: from eggs.gnu.org ([2001:4830:134:3::10]:43779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCJho-0002xA-5n for qemu-devel@nongnu.org; Thu, 01 Dec 2016 00:14:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCJhl-0007SC-Ho for qemu-devel@nongnu.org; Thu, 01 Dec 2016 00:14:48 -0500 Received: from mail-yw0-x243.google.com ([2607:f8b0:4002:c05::243]:33208) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cCJhl-0007QH-C1 for qemu-devel@nongnu.org; Thu, 01 Dec 2016 00:14:45 -0500 Received: by mail-yw0-x243.google.com with SMTP id s68so16780322ywg.0 for ; Wed, 30 Nov 2016 21:14:45 -0800 (PST) From: Pranith Kumar Date: Thu, 1 Dec 2016 00:14:27 -0500 Message-Id: <20161201051433.17168-14-bobby.prani@gmail.com> In-Reply-To: <20161201051433.17168-1-bobby.prani@gmail.com> References: <20161201051433.17168-1-bobby.prani@gmail.com> Subject: [Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: alex.bennee@linaro.org Cc: qemu-devel@nongnu.org, rth@twiddle.net Include a missing header and rename the function names to avoid definition mis-match. Signed-off-by: Pranith Kumar --- 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 +#include -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