diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-11-22 13:30:11 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-11-22 13:30:11 +0100 |
| commit | 554f4889bc3937d29893bb873429e01fd10953a1 (patch) | |
| tree | 699db8c0a70bf7eb6a82486109fb51d408af8171 /src | |
| parent | b584832e756adc3501dad65ec35d1ed7cd43a2f0 (diff) | |
| download | box64-554f4889bc3937d29893bb873429e01fd10953a1.tar.gz box64-554f4889bc3937d29893bb873429e01fd10953a1.zip | |
[RISCV] Fix build
Diffstat (limited to 'src')
| -rwxr-xr-x | src/emu/x64syscall.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/emu/x64syscall.c b/src/emu/x64syscall.c index 119e4b5d..b3af6daa 100755 --- a/src/emu/x64syscall.c +++ b/src/emu/x64syscall.c @@ -206,7 +206,9 @@ scwrap_t syscallwrap[] = { { 258, __NR_mkdirat, 3}, //{ 262, __NR_fstatat, 4}, { 263, __NR_unlinkat, 3}, + #ifdef __NR_renameat { 264, __NR_renameat, 4}, + #endif { 267, __NR_readlinkat, 4}, { 270, __NR_pselect6, 6}, { 272, __NR_unshare, 1}, @@ -676,6 +678,13 @@ void EXPORT x64Syscall(x64emu_t *emu) if(R_EAX==0xffffffff) R_RAX = (uint64_t)-errno; break; + #ifndef __NR_renameat + case 264: + R_EAX = (uint32_t)renameat((int)R_RDI, (const char*)R_RSI, (int)R_EDX, (const char*)R_R10); + if(R_EAX==0xffffffff) + R_RAX = (uint64_t)-errno; + break; + #endif #ifndef NOALIGN case 281: // sys_epool_pwait R_EAX = (uint32_t)my_epoll_pwait(emu, (int)R_EDI, (void*)R_RSI, (int)R_EDX, (int)R_R10d, (void*)R_R8); @@ -918,6 +927,10 @@ uintptr_t EXPORT my_syscall(x64emu_t *emu) #endif case 262: return (uint64_t)(int64_t)my_fstatat(emu, (int)R_RSI, (char*)R_RDX, (void*)R_RCX, (int)R_R8d); + #ifndef __NR_renameat + case 264: + return (uint64_t)(int64_t)renameat((int)R_RSI, (const char*)R_RDX, (int)R_ECX, (const char*)R_R8); + #endif #ifndef NOALIGN case 281: // sys_epool_pwait return (uint64_t)(int64_t)my_epoll_pwait(emu, (int)R_ESI, (void*)R_RDX, (int)R_ECX, (int)R_R8d, (void*)R_R9); |