Commit 3ae43202754711808ea5186e327bfd0533dd88fc

Authored by ths
1 parent 5fafdf24

Add some missing checks for host syscalls.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3174 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 7 additions and 5 deletions
linux-user/syscall.c
... ... @@ -161,15 +161,17 @@ static int gettid(void) {
161 161 _syscall1(int,sys_uname,struct new_utsname *,buf)
162 162 _syscall2(int,sys_getcwd1,char *,buf,size_t,size)
163 163 _syscall3(int, sys_getdents, uint, fd, struct dirent *, dirp, uint, count);
  164 +#if defined(TARGET_NR_getdents64) && defined(__NR_getdents64)
164 165 _syscall3(int, sys_getdents64, uint, fd, struct dirent64 *, dirp, uint, count);
  166 +#endif
165 167 _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
166 168 loff_t *, res, uint, wh);
167 169 _syscall3(int,sys_rt_sigqueueinfo,int,pid,int,sig,siginfo_t *,uinfo)
168 170 _syscall3(int,sys_syslog,int,type,char*,bufp,int,len)
169   -#ifdef TARGET_NR_tgkill
  171 +#if defined(TARGET_NR_tgkill) && defined(__NR_tgkill)
170 172 _syscall3(int,sys_tgkill,int,tgid,int,pid,int,sig)
171 173 #endif
172   -#ifdef TARGET_NR_tkill
  174 +#if defined(TARGET_NR_tkill) && defined(__NR_tkill)
173 175 _syscall2(int,sys_tkill,int,tid,int,sig)
174 176 #endif
175 177 #ifdef __NR_exit_group
... ... @@ -3845,7 +3847,7 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
3845 3847 }
3846 3848 #endif
3847 3849 break;
3848   -#ifdef TARGET_NR_getdents64
  3850 +#if defined(TARGET_NR_getdents64) && defined(__NR_getdents64)
3849 3851 case TARGET_NR_getdents64:
3850 3852 {
3851 3853 struct dirent64 *dirp;
... ... @@ -4634,13 +4636,13 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
4634 4636 break;
4635 4637 #endif
4636 4638  
4637   -#ifdef TARGET_NR_tkill
  4639 +#if defined(TARGET_NR_tkill) && defined(__NR_tkill)
4638 4640 case TARGET_NR_tkill:
4639 4641 ret = get_errno(sys_tkill((int)arg1, (int)arg2));
4640 4642 break;
4641 4643 #endif
4642 4644  
4643   -#ifdef TARGET_NR_tgkill
  4645 +#if defined(TARGET_NR_tgkill) && defined(__NR_tgkill)
4644 4646 case TARGET_NR_tgkill:
4645 4647 ret = get_errno(sys_tgkill((int)arg1, (int)arg2, (int)arg3));
4646 4648 break;
... ...