summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/linux/process.cc8
-rw-r--r--src/sim/syscall_emul.cc3
-rw-r--r--src/sim/syscall_emul.hh2
3 files changed, 12 insertions, 1 deletions
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc
index 9ec4ca040..22fe0026c 100644
--- a/src/arch/x86/linux/process.cc
+++ b/src/arch/x86/linux/process.cc
@@ -298,7 +298,11 @@ static SyscallDesc syscallDescs64[] = {
/* 75 */ SyscallDesc("fdatasync", unimplementedFunc),
/* 76 */ SyscallDesc("truncate", truncateFunc),
/* 77 */ SyscallDesc("ftruncate", ftruncateFunc),
+#if defined(SYS_getdents)
/* 78 */ SyscallDesc("getdents", getdentsFunc),
+#else
+ /* 78 */ SyscallDesc("getdents", unimplementedFunc),
+#endif
/* 79 */ SyscallDesc("getcwd", getcwdFunc),
/* 80 */ SyscallDesc("chdir", chdirFunc),
/* 81 */ SyscallDesc("fchdir", unimplementedFunc),
@@ -690,7 +694,11 @@ static SyscallDesc syscallDescs32[] = {
/* 138 */ SyscallDesc("setfsuid", unimplementedFunc),
/* 139 */ SyscallDesc("setfsgid", unimplementedFunc),
/* 140 */ SyscallDesc("_llseek", _llseekFunc),
+#if defined(SYS_getdents)
/* 141 */ SyscallDesc("getdents", getdentsFunc),
+#else
+ /* 141 */ SyscallDesc("getdents", unimplementedFunc),
+#endif
/* 142 */ SyscallDesc("_newselect", unimplementedFunc),
/* 143 */ SyscallDesc("flock", unimplementedFunc),
/* 144 */ SyscallDesc("msync", unimplementedFunc),
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index 794b0bc2c..4a6fafa27 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -1151,6 +1151,7 @@ rmdirFunc(SyscallDesc *desc, int num, Process *p, ThreadContext *tc)
return (result == -1) ? -errno : result;
}
+#if defined(SYS_getdents)
SyscallReturn
getdentsFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc)
{
@@ -1198,4 +1199,4 @@ getdentsFunc(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc)
buf_arg.copyOut(tc->getMemProxy());
return status;
}
-
+#endif
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 17d410937..ba607c9cb 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -303,9 +303,11 @@ SyscallReturn pipeImpl(SyscallDesc *desc, int num, Process *p,
SyscallReturn getpidFunc(SyscallDesc *desc, int num,
Process *p, ThreadContext *tc);
+#if defined(SYS_getdents)
// Target getdents() handler.
SyscallReturn getdentsFunc(SyscallDesc *desc, int num,
Process *p, ThreadContext *tc);
+#endif
// Target getuid() handler.
SyscallReturn getuidFunc(SyscallDesc *desc, int num,