1#ifndef VSF_CMSG_EXTRAS_H
2#define VSF_CMSG_EXTRAS_H
3
4#include <sys/types.h>
5#include <sys/socket.h>
6
7/* These are from Linux glibc-2.2 */
8#ifndef CMSG_ALIGN
9#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
10               & ~(sizeof (size_t) - 1))
11#endif
12
13#ifndef CMSG_SPACE
14#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
15               + CMSG_ALIGN (sizeof (struct cmsghdr)))
16#endif
17
18#ifndef CMSG_LEN
19#define CMSG_LEN(len)   (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
20#endif
21
22#endif /* VSF_CMSG_EXTRAS_H */
23
24