Commit 39b9aae15b8766a9456dc12dd89b70ed6ed50c97
1 parent
7494b0f9
Linux userland emulation of prctl, from Debian patchset.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2421 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
1 deletions
linux-user/syscall.c
| @@ -32,6 +32,7 @@ | @@ -32,6 +32,7 @@ | ||
| 32 | #include <sys/time.h> | 32 | #include <sys/time.h> |
| 33 | #include <sys/stat.h> | 33 | #include <sys/stat.h> |
| 34 | #include <sys/mount.h> | 34 | #include <sys/mount.h> |
| 35 | +#include <sys/prctl.h> | ||
| 35 | #include <sys/resource.h> | 36 | #include <sys/resource.h> |
| 36 | #include <sys/mman.h> | 37 | #include <sys/mman.h> |
| 37 | #include <sys/swap.h> | 38 | #include <sys/swap.h> |
| @@ -3422,7 +3423,8 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, | @@ -3422,7 +3423,8 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, | ||
| 3422 | case TARGET_NR_nfsservctl: | 3423 | case TARGET_NR_nfsservctl: |
| 3423 | goto unimplemented; | 3424 | goto unimplemented; |
| 3424 | case TARGET_NR_prctl: | 3425 | case TARGET_NR_prctl: |
| 3425 | - goto unimplemented; | 3426 | + ret = get_errno(prctl(arg1, arg2, arg3, arg4, arg5)); |
| 3427 | + break; | ||
| 3426 | #ifdef TARGET_NR_pread | 3428 | #ifdef TARGET_NR_pread |
| 3427 | case TARGET_NR_pread: | 3429 | case TARGET_NR_pread: |
| 3428 | page_unprotect_range(arg2, arg3); | 3430 | page_unprotect_range(arg2, arg3); |