diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-16 21:39:48 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-09-16 21:39:48 +0000 |
commit | 3ae43202754711808ea5186e327bfd0533dd88fc (patch) | |
tree | 13ca2aed9eced26f85c0adff4f7a3efb9ade143a /linux-user | |
parent | 5fafdf24ef2c090c164d4dc89684b3f379dbdd87 (diff) |
Add some missing checks for host syscalls.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3174 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a924490772..943955d97f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -161,15 +161,17 @@ static int gettid(void) { _syscall1(int,sys_uname,struct new_utsname *,buf) _syscall2(int,sys_getcwd1,char *,buf,size_t,size) _syscall3(int, sys_getdents, uint, fd, struct dirent *, dirp, uint, count); +#if defined(TARGET_NR_getdents64) && defined(__NR_getdents64) _syscall3(int, sys_getdents64, uint, fd, struct dirent64 *, dirp, uint, count); +#endif _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, loff_t *, res, uint, wh); _syscall3(int,sys_rt_sigqueueinfo,int,pid,int,sig,siginfo_t *,uinfo) _syscall3(int,sys_syslog,int,type,char*,bufp,int,len) -#ifdef TARGET_NR_tgkill +#if defined(TARGET_NR_tgkill) && defined(__NR_tgkill) _syscall3(int,sys_tgkill,int,tgid,int,pid,int,sig) #endif -#ifdef TARGET_NR_tkill +#if defined(TARGET_NR_tkill) && defined(__NR_tkill) _syscall2(int,sys_tkill,int,tid,int,sig) #endif #ifdef __NR_exit_group @@ -3845,7 +3847,7 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, } #endif break; -#ifdef TARGET_NR_getdents64 +#if defined(TARGET_NR_getdents64) && defined(__NR_getdents64) case TARGET_NR_getdents64: { struct dirent64 *dirp; @@ -4634,13 +4636,13 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, break; #endif -#ifdef TARGET_NR_tkill +#if defined(TARGET_NR_tkill) && defined(__NR_tkill) case TARGET_NR_tkill: ret = get_errno(sys_tkill((int)arg1, (int)arg2)); break; #endif -#ifdef TARGET_NR_tgkill +#if defined(TARGET_NR_tgkill) && defined(__NR_tgkill) case TARGET_NR_tgkill: ret = get_errno(sys_tgkill((int)arg1, (int)arg2, (int)arg3)); break; |