In the Darwin headers the macro __DARWIN_ALIGN32 is used for
the CMSG macros. We were using just ALIGN which looks like
it uses __DARWIN_ALIGN for 8 byte alignment. Using the
wrong alignment gate a wrong count of fds and check_cmsg_for_fds
was only calling ML_(record_fd_open_named) for one fd. The result
was fd errors when writing to a second fd that should have been
recorded.
#define vki_cmsghdr cmsghdr
-#define VKI_CMSG_ALIGN(a) ALIGN(a)
+#define VKI_CMSG_ALIGN(a) __DARWIN_ALIGN32(a)
#define VKI_CMSG_DATA(cmsg) CMSG_DATA(cmsg)
#define VKI_CMSG_FIRSTHDR(mhdr) CMSG_FIRSTHDR(mhdr)
#define VKI_CMSG_NXTHDR(mhdr, cmsg) CMSG_NXTHDR(mhdr, cmsg)