linux-user: Handle arches with llseek instead of _llseek
PATCH 1/1 linux-user: Handle arches with llseek instead of _llseek
Recently merged kernel ports (such as OpenRISC and Meta) have an llseek system call instead of _llseek. This is handled for the host architecture by defining __NR__llseek as __NR_llseek, but not for the target architecture.
Handle it in the same way for these architectures, defining TARGET_NR__llseek as TARGET_NR_llseek.
--- linux-user/syscall.c | 5 +++++ 1 file changed, 5 insertions(+)
linux-user/syscall.c +5 -0
@@ -198,6 +198,11 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \#define __NR__llseek __NR_lseek#endif +/* Newer kernel ports have llseek() instead of _llseek() */ +#if defined(TARGET_NR_llseek) && !defined(TARGET_NR__llseek) +#define TARGET_NR__llseek TARGET_NR_llseek +#endif +#ifdef __NR_gettid_syscall0 (int, gettid) #else
Signature · 1 line
1.8.3.2
Hi James,
Quoted 4 lines · James Hogan
Recently merged kernel ports (such as OpenRISC and Meta) have an llseek system call instead of
_llseek. This is handled for the host architecture by defining__NR__llseekas__NR_llseek, but not for the target architecture.
Thank you, James.
I don't have a Linux test environment for I'm a OS X user, may you please make a test, please?
Quoted 28 lines
Handle it in the same way for these architectures, defining
TARGET_NR__llseekasTARGET_NR_llseek.Signed-off-by James Hogan <[email protected]>Cc Riku Voipio <[email protected]>Cc Jia Liu <[email protected]>--- linux-user/syscall.c | 5 +++++ 1 file changed, 5 insertions(+)linux-user/syscall.c +5
-1@@ -198,6 +198,11 @@ static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \#define __NR__llseek __NR_lseek#endif +/* Newer kernel ports have llseek() instead of _llseek() */ +#if defined(TARGET_NR_llseek) && !defined(TARGET_NR__llseek) +#define TARGET_NR__llseek TARGET_NR_llseek +#endif +#ifdef __NR_gettid_syscall0 (int, gettid) #else --
Quoted 2 lines
1.8.3.2
Regards,
Jia