From 95c9917c8638f1eb5480e851c8dfbb808f1687bd Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 2 Oct 2014 07:05:35 +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 --- lib/socket_wrapper/socket_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c index 903eec2153..930ab58cc5 100644 --- a/lib/socket_wrapper/socket_wrapper.c +++ b/lib/socket_wrapper/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