From: yan11.meng Date: Fri, 27 Mar 2020 02:52:35 +0000 (+0800) Subject: fix build error in xUbuntu_19.10 X-Git-Tag: submit/trunk/20200612.180310~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0af4815f01745ecd91ac50c0238f6de0eb5db30;p=tools%2Fqemu-arm-static.git fix build error in xUbuntu_19.10 Change-Id: I5eaeaf7bd2f31ec52d4596561a81c506f5791de0 Signed-off-by: yan11.meng --- diff --git a/linux-user/strace.c b/linux-user/strace.c index ea6c1d24e..2517942b5 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "qemu.h" int do_strace=0; diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 2b419451f..998ae6a67 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -175,7 +175,7 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \ return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5, arg6); \ } - +#define __NR_sys_gettid __NR_gettid #define __NR_sys_uname __NR_uname #define __NR_sys_getcwd1 __NR_getcwd #define __NR_sys_getdents __NR_getdents @@ -196,11 +196,11 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \ #endif #ifdef __NR_gettid -_syscall0(int, gettid) +_syscall0(int, sys_gettid) #else /* This is a replacement for the host gettid() and must return a host errno. */ -static int gettid(void) { +static int sys_gettid(void) { return -ENOSYS; } #endif @@ -4247,7 +4247,7 @@ static void *clone_func(void *arg) cpu = ENV_GET_CPU(env); thread_cpu = cpu; ts = (TaskState *)env->opaque; - info->tid = gettid(); + info->tid = sys_gettid(); cpu->host_tid = info->tid; task_settid(ts); if (info->child_tidptr) @@ -4364,9 +4364,9 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp, mapping. We can't repeat the spinlock hack used above because the child process gets its own copy of the lock. */ if (flags & CLONE_CHILD_SETTID) - put_user_u32(gettid(), child_tidptr); + put_user_u32(sys_gettid(), child_tidptr); if (flags & CLONE_PARENT_SETTID) - put_user_u32(gettid(), parent_tidptr); + put_user_u32(sys_gettid(), parent_tidptr); ts = (TaskState *)env->opaque; if (flags & CLONE_SETTLS) cpu_set_tls (env, newtls); @@ -8318,7 +8318,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, break; #endif case TARGET_NR_gettid: - ret = get_errno(gettid()); + ret = get_errno(sys_gettid()); break; #ifdef TARGET_NR_readahead case TARGET_NR_readahead: