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 <Brandon.Potter@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
This commit is contained in:
Brandon Potter 2017-01-29 12:22:33 +00:00
parent 1991ff3bb2
commit fcf94310eb

View file

@ -160,6 +160,15 @@ void
Process::clone(ThreadContext *otc, ThreadContext *ntc, Process::clone(ThreadContext *otc, ThreadContext *ntc,
Process *np, TheISA::IntReg flags) 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) { if (CLONE_VM & flags) {
/** /**
* Share the process memory address space between the new process * Share the process memory address space between the new process