From 930979744009b4cec970bb9e851cff3259c895b8 Mon Sep 17 00:00:00 2001 From: Andrea Mondelli Date: Mon, 4 Feb 2019 15:12:40 -0500 Subject: [PATCH] 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 Maintainer: Brandon Potter --- src/sim/syscall_emul.hh | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.30.2