From a66d12c23517a010f5a05efbc2e47d61fba705c9 Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Tue, 20 Nov 2018 16:45:07 +0000 Subject: 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 Maintainer: Brandon Potter --- src/sim/syscall_emul.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sim/syscall_emul.hh') 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, -- cgit v1.2.3