arch-riscv: Fix compilation error due to getdents* syscalls

In src/sim/syscall_emul.*, getdents and getdents64 are guarded
by #ifdefs. Similar #ifdefs should be in se_workload.cc for each
arch.

Change-Id: Ie636a739235711c3e6d8256fd7929b7d8b4ec953
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60189
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Hoa Nguyen
2022-06-01 00:29:47 +00:00
parent 424b946d16
commit 96870d4713

View File

@@ -185,7 +185,11 @@ SyscallDescTable<SEWorkload::SyscallABI> EmuLinux::syscallDescs64 = {
{ 58, "vhangup" },
{ 59, "pipe2", pipe2Func },
{ 60, "quotactl" },
#if defined(SYS_getdents64)
{ 61, "getdents64", getdents64Func },
#else
{ 61, "getdents64" },
#endif
{ 62, "lseek", lseekFunc },
{ 63, "read", readFunc<RiscvLinux64> },
{ 64, "write", writeFunc<RiscvLinux64> },
@@ -436,7 +440,11 @@ SyscallDescTable<SEWorkload::SyscallABI> EmuLinux::syscallDescs64 = {
{ 1062, "time", timeFunc<RiscvLinux64> },
{ 1063, "utime" },
{ 1064, "creat" },
#if defined(SYS_getdents)
{ 1065, "getdents", getdentsFunc },
#else
{ 1065, "getdents" },
#endif
{ 1066, "futimesat" },
{ 1067, "select", selectFunc<RiscvLinux64> },
{ 1068, "poll", pollFunc<RiscvLinux64> },
@@ -516,7 +524,11 @@ SyscallDescTable<SEWorkload::SyscallABI> EmuLinux::syscallDescs32 = {
{ 58, "vhangup" },
{ 59, "pipe2", pipe2Func },
{ 60, "quotactl" },
#if defined(SYS_getdents64)
{ 61, "getdents64", getdents64Func },
#else
{ 61, "getdents64" },
#endif
{ 62, "lseek", lseekFunc },
{ 63, "read", readFunc<RiscvLinux32> },
{ 64, "write", writeFunc<RiscvLinux32> },
@@ -767,7 +779,11 @@ SyscallDescTable<SEWorkload::SyscallABI> EmuLinux::syscallDescs32 = {
{ 1062, "time", timeFunc<RiscvLinux32> },
{ 1063, "utime" },
{ 1064, "creat" },
#if defined(SYS_getdents)
{ 1065, "getdents", getdentsFunc },
#else
{ 1065, "getdents" },
#endif
{ 1066, "futimesat" },
{ 1067, "select", selectFunc<RiscvLinux32> },
{ 1068, "poll", pollFunc<RiscvLinux32> },