From 93d8e6b898a70a3f6dba9da385d5933683bf325f Mon Sep 17 00:00:00 2001 From: Brandon Potter Date: Fri, 20 Jan 2017 14:12:58 -0500 Subject: syscall_emul: #ifdef new system calls to allow builds on OSX and BSD --- src/sim/syscall_emul.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/sim/syscall_emul.cc') 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; } -- cgit v1.2.3