summaryrefslogtreecommitdiffstats
path: root/lib/socket_wrapper
diff options
context:
space:
mode:
authorJakub Hrozek <jakub.hrozek@gmail.com>2014-10-02 07:05:35 +0200
committerAndreas Schneider <asn@cryptomilk.org>2014-10-02 09:35:10 +0200
commit95c9917c8638f1eb5480e851c8dfbb808f1687bd (patch)
tree6fe541a553c8461e1b2bd59fd233c04a3397e895 /lib/socket_wrapper
parent5e70d80e7d7752a1df16b871d57fbcd8334a44e6 (diff)
downloadsamba-95c9917c8638f1eb5480e851c8dfbb808f1687bd.tar.gz
samba-95c9917c8638f1eb5480e851c8dfbb808f1687bd.tar.xz
samba-95c9917c8638f1eb5480e851c8dfbb808f1687bd.zip
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 <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'lib/socket_wrapper')
-rw-r--r--lib/socket_wrapper/socket_wrapper.c2
1 files changed, 1 insertions, 1 deletions
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 */