|
Dan Horák |
330491 |
commit d35b261c7a94be9e2fcad5484343544d58ff99be
|
|
Dan Horák |
330491 |
Author: Richard Henderson <rth@twiddle.net>
|
|
Dan Horák |
330491 |
Date: Fri Jun 4 12:14:10 2010 -0700
|
|
Dan Horák |
330491 |
|
|
Dan Horák |
330491 |
s390x: Avoid _llseek.
|
|
Dan Horák |
330491 |
|
|
Dan Horák |
330491 |
There's no _llseek on s390x either. Replace the existing
|
|
Dan Horák |
330491 |
test for __x86_64__ with a functional test for __NR_llseek.
|
|
Dan Horák |
330491 |
|
|
Dan Horák |
330491 |
Signed-off-by: Richard Henderson <rth@twiddle.net>
|
|
Dan Horák |
330491 |
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
|
Dan Horák |
330491 |
|
|
Dan Horák |
330491 |
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
|
Dan Horák |
330491 |
index 8222cb9..e94f1ee 100644
|
|
Dan Horák |
330491 |
--- a/linux-user/syscall.c
|
|
Dan Horák |
330491 |
+++ b/linux-user/syscall.c
|
|
Dan Horák |
330491 |
@@ -208,7 +208,7 @@ _syscall3(int, sys_getdents, uint, fd, struct linux_dirent *, dirp, uint, count)
|
|
Dan Horák |
330491 |
_syscall3(int, sys_getdents64, uint, fd, struct linux_dirent64 *, dirp, uint, count);
|
|
Dan Horák |
330491 |
#endif
|
|
Dan Horák |
330491 |
_syscall2(int, sys_getpriority, int, which, int, who);
|
|
Dan Horák |
330491 |
-#if defined(TARGET_NR__llseek) && !defined (__x86_64__)
|
|
Dan Horák |
330491 |
+#if defined(TARGET_NR__llseek) && defined(__NR_llseek)
|
|
Dan Horák |
330491 |
_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
|
|
Dan Horák |
330491 |
loff_t *, res, uint, wh);
|
|
Dan Horák |
330491 |
#endif
|
|
Dan Horák |
330491 |
@@ -5933,7 +5933,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
|
Dan Horák |
330491 |
#ifdef TARGET_NR__llseek /* Not on alpha */
|
|
Dan Horák |
330491 |
case TARGET_NR__llseek:
|
|
Dan Horák |
330491 |
{
|
|
Dan Horák |
330491 |
-#if defined (__x86_64__)
|
|
Dan Horák |
330491 |
+#if !defined(__NR_llseek)
|
|
Dan Horák |
330491 |
ret = get_errno(lseek(arg1, ((uint64_t )arg2 << 32) | arg3, arg5));
|
|
Dan Horák |
330491 |
if (put_user_s64(ret, arg4))
|
|
Dan Horák |
330491 |
goto efault;
|