summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.cc
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@arm.com>2018-11-20 16:45:07 +0000
committerCiro Santilli <ciro.santilli@arm.com>2018-11-27 11:46:36 +0000
commita66d12c23517a010f5a05efbc2e47d61fba705c9 (patch)
tree798e527a62dcbb15594b9e35e455ea8801e7054b /src/sim/syscall_emul.cc
parent90dfafa2c4333a4d9aff7e296554c68752880825 (diff)
downloadgem5-a66d12c23517a010f5a05efbc2e47d61fba705c9.tar.xz
sim-se: only implement getdentsFunc on supported hosts
The implementation of the getdents syscall relies on SYS_getdents, which is not available on all archs, because the getdents syscall has been superseded by getdents64, and does not exist on newer archs such as aarch64. This leads the build to break on aarch64 hosts with error: error: 'SYS_getdents' was not declared in this scope Change-Id: I8701fb5b61c0418b14a9463ef135a391a7f7a9ba Reviewed-on: https://gem5-review.googlesource.com/c/14596 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Diffstat (limited to 'src/sim/syscall_emul.cc')
-rw-r--r--src/sim/syscall_emul.cc3
1 files changed, 2 insertions, 1 deletions
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