cmsg_extras.h
上传用户:ig0539
上传日期:2022-05-21
资源大小:181k
文件大小:1k
- #ifndef VSF_CMSG_EXTRAS_H
- #define VSF_CMSG_EXTRAS_H
- #include <sys/types.h>
- #include <sys/socket.h>
- /* These are from Linux glibc-2.2 */
- #ifndef CMSG_ALIGN
- #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1)
- & ~(sizeof (size_t) - 1))
- #endif
- #ifndef CMSG_SPACE
- #define CMSG_SPACE(len) (CMSG_ALIGN (len)
- + CMSG_ALIGN (sizeof (struct cmsghdr)))
- #endif
- #ifndef CMSG_LEN
- #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
- #endif
- #endif /* VSF_CMSG_EXTRAS_H */