summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.cc
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2017-01-20 14:12:58 -0500
committerBrandon Potter <brandon.potter@amd.com>2017-01-20 14:12:58 -0500
commit93d8e6b898a70a3f6dba9da385d5933683bf325f (patch)
tree276c296a11129ec68550f946ac8776b84e369461 /src/sim/syscall_emul.cc
parent1961a942f395d0b880461106a09761b92e2d53f6 (diff)
downloadgem5-93d8e6b898a70a3f6dba9da385d5933683bf325f.tar.xz
syscall_emul: #ifdef new system calls to allow builds on OSX and BSD
Diffstat (limited to 'src/sim/syscall_emul.cc')
-rw-r--r--src/sim/syscall_emul.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc
index da89f7a08..b34e983a6 100644
--- a/src/sim/syscall_emul.cc
+++ b/src/sim/syscall_emul.cc
@@ -895,6 +895,9 @@ SyscallReturn
fallocateFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
ThreadContext *tc)
{
+#if NO_FALLOCATE
+ warn("Host OS cannot support calls to fallocate. Ignoring syscall");
+#else
int index = 0;
int tgt_fd = process->getSyscallArg(tc, index);
int mode = process->getSyscallArg(tc, index);
@@ -908,7 +911,7 @@ fallocateFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
int result = fallocate(sim_fd, mode, offset, len);
if (result < 0)
return -errno;
-
+#endif
return 0;
}