From: Andrea Mondelli Date: Mon, 4 Feb 2019 20:12:40 +0000 (-0500) Subject: sim: added missed macro definition on MacOS X-Git-Tag: v19.0.0.0~1190 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=930979744009b4cec970bb9e851cff3259c895b8;p=gem5.git 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 --- 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