Hoa Nguyen has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/60189 )

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

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 <hoangu...@ucdavis.edu>
---
M src/arch/riscv/linux/se_workload.cc
1 file changed, 30 insertions(+), 0 deletions(-)



diff --git a/src/arch/riscv/linux/se_workload.cc b/src/arch/riscv/linux/se_workload.cc
index f8053d4..dd9a8a2 100644
--- a/src/arch/riscv/linux/se_workload.cc
+++ b/src/arch/riscv/linux/se_workload.cc
@@ -185,7 +185,11 @@
     { 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 @@
     { 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 @@
     { 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 @@
     { 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> },

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/60189
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie636a739235711c3e6d8256fd7929b7d8b4ec953
Gerrit-Change-Number: 60189
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen <hoangu...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org

Reply via email to