From 81b133d9638114457b3fc237b25066cc59e221e9 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 10 Sep 2018 09:18:17 +1000 Subject: [PATCH] avoid macro name collision with system defined macro --- lib/isc/include/isc/util.h | 2 +- lib/isc/unix/socket.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h index acc3d64c64..2343bebd97 100644 --- a/lib/isc/include/isc/util.h +++ b/lib/isc/include/isc/util.h @@ -262,7 +262,7 @@ extern void mock_assert(const int result, const char* const expression, /*% * Alignment */ -#define ALIGN(x, a) (((x) + (a) - 1) & ~((typeof(x))(a)-1)) +#define ISC_ALIGN(x, a) (((x) + (a) - 1) & ~((typeof(x))(a)-1)) /*% * Misc diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index f59a85e5cc..2aebb46ac0 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -314,8 +314,8 @@ typedef isc_event_t intev_t; #define CMSG_SP_INT 24 /* Align cmsg buffers to be safe on SPARC etc. */ -#define RECVCMSGBUFLEN ALIGN(2*(CMSG_SP_IN6PKT + CMSG_SP_TIMESTAMP + CMSG_SP_TCTOS)+1, sizeof(void*)) -#define SENDCMSGBUFLEN ALIGN(2*(CMSG_SP_IN6PKT + CMSG_SP_INT + CMSG_SP_TCTOS)+1, sizeof(void*)) +#define RECVCMSGBUFLEN ISC_ALIGN(2*(CMSG_SP_IN6PKT + CMSG_SP_TIMESTAMP + CMSG_SP_TCTOS)+1, sizeof(void*)) +#define SENDCMSGBUFLEN ISC_ALIGN(2*(CMSG_SP_IN6PKT + CMSG_SP_INT + CMSG_SP_TCTOS)+1, sizeof(void*)) /*% * The number of times a send operation is repeated if the result is EINTR.