From baa8b438f76e66531b26a90c02ab11d4e6c09944 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 3 Jul 2014 23:13:29 +0200 Subject: Provide a compatible declaration of CMSG_ALIGN Some platforms (like OSX) do support some of the CMGS macros, but don't have a CMSG_ALIGN macro of their own. Signed-off-by: Jakub Hrozek Reviewed-by: Andreas Schneider Reviewed-by: Michael Adam --- src/socket_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 903eec2..930ab58 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -3336,7 +3336,7 @@ int ioctl(int s, unsigned long int r, ...) # ifdef _ALIGN /* BSD */ #define CMSG_ALIGN _ALIGN # else -#error NO_CMSG_ALIGN +#define CMSG_ALIGN(len) (((len) + sizeof(size_t) - 1) & ~(sizeof(size_t) - 1)) # endif /* _ALIGN */ #endif /* CMSG_ALIGN */ -- cgit