summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorAndrea Mondelli <Andrea.Mondelli@ucf.edu>2019-02-04 15:12:40 -0500
committerAndrea Mondelli <Andrea.Mondelli@ucf.edu>2019-02-06 15:12:19 +0000
commit930979744009b4cec970bb9e851cff3259c895b8 (patch)
treeadd940b5fe96796dc1f0e59e4175a5f4a1a6ccdb /src/sim
parent1989ce99056885a46fd12c9c9e4c4fbd1045718e (diff)
downloadgem5-930979744009b4cec970bb9e851cff3259c895b8.tar.xz
sim: added missed macro definition on MacOS
A recent patch add the use of the macro: CMSG_ALIGN This macro is not very cross-platform, and needs to be defined according to the platform. This patch defines the missing macro on MacOS. Change-Id: I582f69e652dc060b4532358141179ad6d37eafc7 Reviewed-on: https://gem5-review.googlesource.com/c/16102 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/syscall_emul.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index ceeacd39b..5ba487c7c 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -116,6 +116,10 @@
#include "sim/syscall_emul_buf.hh"
#include "sim/syscall_return.hh"
+#if defined(__APPLE__) && defined(__MACH__) && !defined(CMSG_ALIGN)
+#define CMSG_ALIGN(len) (((len) + sizeof(size_t) - 1) & ~(sizeof(size_t) - 1))
+#endif
+
//////////////////////////////////////////////////////////////////////
//
// The following emulation functions are generic enough that they