From fcf94310eb9a6cf17cc70724f5ef81932946997f Mon Sep 17 00:00:00 2001 From: Brandon Potter Date: Sun, 29 Jan 2017 12:22:33 +0000 Subject: [PATCH] syscall-emul: Hotfix for FreeBSD/Mac builds The clone system call added in 236719892 relies on header files from Linux systems. Obviously, this prevents compilation for anyone using FreeBSD or Mac to compile the simulator. This changeset is meant as a temporary fix to allow builds on non-Linux systems until a proper solution is found. Change-Id: I404cc41c588ed193dd2c1ca0c1aea35b0786fe4e Reviewed-on: https://gem5-review.googlesource.com/2420 Maintainer: Brandon Potter Reviewed-by: Jason Lowe-Power --- src/sim/process.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sim/process.cc b/src/sim/process.cc index 89a82a6a1..bfc52c361 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -160,6 +160,15 @@ void Process::clone(ThreadContext *otc, ThreadContext *ntc, Process *np, TheISA::IntReg flags) { +#ifndef CLONE_VM +#define CLONE_VM 0 +#endif +#ifndef CLONE_FILES +#define CLONE_FILES 0 +#endif +#ifndef CLONE_THREAD +#define CLONE_THREAD 0 +#endif if (CLONE_VM & flags) { /** * Share the process memory address space between the new process -- 2.30.2