According to POSIX sys/socket.h must define CMSG_NXTHDR but most not

define NULL. This means we cannot use NULL in the definition of CMSG_NXTHDR.
So replace NULL with 0.

PR:		kern/60309
Submitted by:	Jeff King <peff-freebsd@peff.net>
This commit is contained in:
harti 2004-07-16 17:42:48 +00:00
parent f7175fc0c6
commit 03c1f3ab46

View File

@ -444,7 +444,7 @@ struct cmsgcred {
(((char *)(cmsg) + _ALIGN((cmsg)->cmsg_len) + \
_ALIGN(sizeof(struct cmsghdr)) > \
(char *)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \
(struct cmsghdr *)NULL : \
(struct cmsghdr *)0 : \
(struct cmsghdr *)((char *)(cmsg) + _ALIGN((cmsg)->cmsg_len)))
#define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control)