Bug #565 ยป df_cmsg_firsthdr.patch
socket.h 25 Feb 2007 15:10:13 -0000 | ||
---|---|---|
(struct cmsghdr *)NULL : \
|
||
(struct cmsghdr *)((caddr_t)(cmsg) + _ALIGN((cmsg)->cmsg_len)))
|
||
#define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control)
|
||
/*
|
||
* RFC 2292 requires to check msg_controllen, in case that the kernel returns
|
||
* an empty list for some reasons.
|
||
*/
|
||
#define CMSG_FIRSTHDR(mhdr) \
|
||
((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
|
||
(struct cmsghdr *)(mhdr)->msg_control : \
|
||
(struct cmsghdr *)NULL)
|
||
/* RFC 2292 additions */
|
||
|